Version-2.6 25 July 2001 - (13-make_description) Move code which substitues the PACKAGER string description files, and the code which handles pkg-suggests/pkg-conflicts files. All three were placed where they were only being called when the desciption file was being generated. - (src2pkg) & (trackinstall) Add support for KISS-linux '*.tpkg' package format. Add DB_ROOT command-line variable which allows to use an arbitrary location of database files when resolving dependency lists. - (15-make_package_slack) Add support for '*.tpkg' format - (01-pre_process) Add support for '*.tpkg' format. Move setting of PKG, PKGNAM and PRGNAM below the distro-specific settings. Use a streamlined way of trimming PRE_FIX. Use /usr/sbin as libexecdir for Slackware, and add libexecdir=/usr/libexec for KISS. - (09-fix_pkg_perms) Add '*.inc' files to header-files lists. Add unused is_elf2. - (14-make_doinst) Remove unused call to make_deb_install_scripts. Add gen_deps_list_kiss Change $(...) syntax to `...` in auto-written config() routine for postinst files. - (14-last_minute_details) Fix call to lzma for compressing docs to *.txz format. When splitting packages, add any link-creation lines which pertain to headers to the PKG_POSTINST of the devel package and purge them from the main PKG_POSTINST. - (src2pkg-helpers) Add a patch to tar-1.13 which adds support for KISS *.tpkg packages Bump src2pkg-helpers version - (src2pkg.build-noarch) Use .tpkg instead of .txz for KISS package and drop _KISS from name. - (09-fix_pkg_perms) Use chmod +x instead of chmod 755 to make sure all ELF files and files in bin dirs are executable. chmod 755 overwrites special perms(suid, etc) which are needed for some progs, like Xorg. - (11-create_docs) trim ChangeLog* files to 1000 lines Version-2.5 February 12 2011 - (14-make_doinst) fix redundant creation of 'config' code for doinst.sh when PRE_FIX is set to '/' - for mini-coreutils disable compiling of mktime and stat and touch which depend on it. - (14-make_doinst) Fix search for dependencies supplied by the same package - (14-last_minute_details) Add usr/share/gtk-doc to the search for documents when splitting packages. - (11-create_docs) fix 'which convert' and remove iconsdir when unable to convert or copy a generic icon - (13-make_description) move handling of suggests and conflict files - (14-make_doinst) suggest/conflicts moved from here. Add code to handle the ADD_REQS or ADD_DEPS variable from scripts. This allows us to add package requirements from within the src2pkg script -which is handier than using a separate pre-made file. It also lets us stipulate binary requireds or add any item(package name) to the list which is automatically generated. Fix wrong search path when looking for already-present provides files. Add inclusion of PATCHLIST when generating package meta-data files. - (14A-last_miute_details) Add search for gtk-doc path when segregating package content. - (08-fake_install) fixed relocation of X11/app-defaults - (src2pkg-doinst.sh) commented unused CHROOT code - (14-make_doinst) Use grep -E instead of egrep. - (01-pre_process) Add '-O1' to the front of the default LDFLAGS. Using this option makes ld work harder to create shared objects which load faster than normally. - (14-last_minute_details) When segregating doc and/or devel packages, add link-creation lines to the sub-package doinst and remove them from the doinst for the main package. When handling unneeded perl files, leave '.packlist' files in place. RELEASE July 19 2011 Version-2.4 January 22 2010 - (14-last_minute_details) fixed file path for static libs when using 'splitpkg=devel'. Thanks to Jemimah for catching and reporting the error. - (06-configure_source) fixed 'waf' options and passing a null NUMJOBS Testing was done on the jack-1.9.6 sources. It appears to be using a different version of waf from what I had tested with before. We were using this: ./waf configure prefix=/$PRE_FIX confdir=$sysconfdir and changed to this: ./waf configure --prefix=/$PRE_FIX Thanks (again) to Jemimah for reporting this error. - (src2pkg-helpers.src2pkg) and (src2pkg.setup) update to src2pkg-helpers-1.3 which incorporates a new patch for coreutils which disables 'mktime' and 'stat' and 'touch' which depended on it. mktime has been a trouble-maker for a long time in the mini-version of coreutils used by src2pkg. Since it is only needed by the non-critical programs stat and touch, well just disable the thing completely. Thanks to 'ponce' who reported the problem (again) and also 'hitest' and Matteo Bernardini. mktime has works or not, depending on which glibc version and arch is being used. Keeping it working is not worth the trouble. - (doinst.sh) and (posinst) Fixed a minor glitch where we were using 'read' with a prompt of "Press any key to continue." (which means is needed) Fixed using 'read -sn 1' as suggested by - (15-make_package_pet) Handle installation or creation of punistall.sh and chmod 755 both pinstall.sh and punistall.sh - (DEFINES) If PKG_FORMAT is set to 'pet2', reset to 'pet' and set PET2=1 and determine PKG_FORMAT automatically if not set -supporting slackware (tgz or txz depending on OS version), vector, zenwalk, salix, slitaz, debian, ubuntu(lsb-release), redhat, suse, opensuse, UnitedLinux, mandrake, mandriva, puppy (and puppy 'woof' PET2). Hopefully centOS will be covered by searching for /etc/redhat-release like mandriva is. - (14-make_doinst) fixed a typo 'LDLAGS' in PKG_META creation - (src2pkg) fixed a type 'wxport' when determining whether to upgrade helpers - (12-compress_man_pages) fix a cosmetic (spacing) glitch - (14-make_doinst) Discriminate between PKG_FORMAT when writing code snippets for install/deinstall scripts. Debian appears to not run scripts from the root '/' directory, so our CHROOT routines and relative paths won't work there -use no chroot and absolute paths instead. - (15-make_package_deb) adapt processing order for above changes in make_doinst and use a more convenient (in SRC_DIR) temporary dir for install files - src2pkg.conf.new Added a template entry and a note about using DOCLIST=MINIMAL to install only a small subset of the possible documents - (src2pkg-dnd) & new file (terminal-wrapper) Use a terminal emulator wrapper to find a suitable terminal. terminal-wrapper simulates the xterm '-hold' option even for terminals which don't support that option. src2pkg has been always trying to use xterm and uses the -hold option in several places. - (01-pre_process) Add detect_terminal_emulator function so that we only have to do detection once each time src2pkg is run. Version-2.4 November 30 2010 - (01-pre_process) at line 136 fix missing '[' - (15-make_package_deb) fix tar error when creating data.tar.xxx by using SRC_DIR as a temporary location for it. Also fixed the same error type in (src2pkg.build-noarch) and (src2pkg.setup). - (src2pkg.setup) use 'dpkg --print-architecture' instead of 'dpkg-architecture -qDEB_HOST_ARCH' - (01-pre_process) & (src2pkg) Run src2pkg.setup using a separate shell instance instead of sourcing the file. (src2pkg.build-narch) chmod 755 src2pkg.setup - (src2pkg.setup) use a dedicated postinst script for debian package setups - (01-pre_process) For debian packages, translate ARCH (i?86=i386, x86_64=amd64) - (14-make_doinst) separate routines for handling package installation scripts to separate slackware routines from debian routines. For make_deb_install_scripts only generate the conffiles file and install any pre-existing scripts found in the CWD, PATCHES_DIR/NAME-patches, CWD/patches or SRC_DIR/debian directories - (01-pre_process) If PKG_CONFIG_LIBDIR is set, reset PKG_CONFIG_PATH to that value. PKG_CONFIG_LIBDIR is a debian-specific setting. We were arbitrarily setting it to match PKG_CONFIG_PATH, but this was not working on lenny, causing configuration to fail on sources which use pkg-config. When cross-compiling on debian, user needs to export PKG_CONFIG_LIBDIR on the command-line like this: 'export PKG_CONFIG_LIBDIR=/path ; src2pkg ...' Above debian fixes tested on Debian 5 lenny - (15-make_package_rpm) fixed occasional Null values for rpm *.spec files which will cause failure - (15-make_package_rpm) Write and use a unique rpmmacros file for each build. This gives us better control of paths and reduces errors on systems where rpmbuild is used independently and is set up for that. Added several more values to rpmmacros to satisfy rpm version used by openSuSE and added '--buildroot' option to rpmbuild commandline. Changes were also made to the (src2pkg.setup) script for proper rpm build of src2pkg-helpers package. - (15-make_package_rpm) Use only first match when grepping for License, Group and other such variables in *.spec files, to avoid mutliple lines - (01-pre_process) remove code for setting up ~/.rpmmacros and ~/.rpmrc files using above method instead. Above rpm fixes tested on openSuSE-11.1 - (01-pre_process) replaced weird characters at lines 741, 748, 749. Using src2pkg on debian Lenny and openSuSE bash versions has shown up a few quirks or warning messages. In this case, the lines above were using all spaces in well-tabbed code, but SuSE bash-4.1.7 saw the spaces as an unknown character and they showed the same when opening the file with kwrite. - Updated Copyright dates and version number throughout RELEASE January 13 2011 -Note that the previous version 2.3 was only distributed to a few testers and never publicly released Version-2.3 May 27 2010 - (14-last_minute_details) always chown any rc.* scripts root:root - 11-create_docs fix typo in prompt output - 14-make_doinst In the routine which generates doinst.sh code for *.new files, add code which duplicatates the perms and ownership of original files. Add $PRE_FIX/etc to the paths searched for *.new files in the package - (15-make_package_deb) & (src2pkg.setup) fix tar 'empty archive' error when building debian packages - (16-post_process) fix missing -f option to rm when removing SRC_DIR. - upgrade to unionfs-fuse-0.24 for src2pkg-helpers - upgrade to src2pkg-helpers-1.2 - update dates and versions in src2pkg, trackinstall, sentry and man-pages RELEASE src2pkg-2.3-noarch-1 (05 July 2010) Version-2.2 20 Jan 2010 - FUNCTIONS added a function named sanitize_lib_paths for use in correcting library paths in pkgconfig *.pc files and libtool *.la files This also includes code to remove the LDFLAGS from *.pc files which should not be there in the libs. - (11-create_docs) Add a switch 'AUTO_ICON=NO' to disable searching for and installing image files. Some sources which should not install an icon contain web-page images which are found and installed as pürogram icons when they shouldn't be. Adding 'AUTO_ICON=NO' to the script disable this. * Use sanitize_lib_paths to correct *.pc files - (09-fix_pkg_perms) Use sanitize_lib_paths to correct *.la files Added a switch ENFORCE_DISABLE_STATIC="NO" to disabel an automatic routine which removes static libraries if --disable-static or --enable-static=no is in EXTRA_CONFIGS. Quite commonly, sources will build and install static libs even when you specify --disable-static. this routine removes them -just before checking for libtool *.la files which will also be removed. Otherwise, libtool *.la files have their libdir paths checked and corrected if necessary to match the LIBDIRSUFFIX. libtool files are handled by using the list of files which is created early in fix_pkg_perms, to avoid wasting time using 'find' again. - (06-configure_source) Hey! fixed cmake again... this time for good, I promise. Since cmake has been so unreliable during the 'make install' phase (because of the varying support for DESTDIR, we now require you to be 'root' to build any cmake packages and set the INSTALL_TYPE=SAFE so that we can be compatible with whatever version of cmake is being used, and no matter which version of cmake the software's cmake CMakelists.txt files were written for. Also brought back a way to make cmake build in the main directory by declaring USE_TOP_DIR. There are some sources which will not build properly otherwise, even though building in the main dir is usually ill-advised - (sb2sp) Limit selection to first line of './configure' when searching for START line. Updated sb2sp version number to 0.7 - (src2pkg.conf) Add section for EXTRA_CMAKE_OPTIONS to allow configuring things like -DCMAKE_BUILD_TYPE=Release (DEFINES) default: EXTRA_CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release" - (11-create_docs) & (12-compress_man_pages) Use tar to 'move' badly-placed docs, man-pages and info pages and remove originals instead of using 'mv'. This makes the operations still work even when multiple copies of a document have been installed. - (14-make_doinst) Fix faulty path to *.new files under PKG_DIR/var when writing config() routines. - (14A-last-minute-details) Remove PKG_DIR/usr/tmp if it's a symlink - (09-fix_pkg_perms) Add routine to explicitly chown and chmod all dirs in LIB_DIRS and BIN_DIRS - I've run into a couple of installs lately which are setting usr/lib to 775 when it should be 755. Also add *.html, *.ps and *.pdf to file types which are ignore when building file-lists of libtool, lib, header and bin files. - (config.guess) & (config.sub) Update to versions used in automake-1.11.1 with the modifications which explicitly identify Slackware and Kiss Linux so that '-gnu' is not added to the triplet string. (05-fix_source_perms) check that the package NAME is not automake before copying config.guess and config.sub, so that when building a new version of automake, the config.guess and config.sub files get patched to add explicit support for Slackware and Kiss linux. - (usr/bin/src2pkg) Fixed execution of src2pkg scripts which are downloaded by src2pkg. Recent changes had removed a 'basename' command which made src2pkg not find (locally) the script it had just downloaded. - (01-pre_process) Fixed double slashes '//' in $initdir usage. Fixed syntax in INC_DIRS, LIB_DIRS, MAN_DIRS and DOC_DIRS declarations. - (08-fake_install) In post_fake_install, add a routine to relocate fonts found in usr/lib/X11/fonts to usr/share/fonts. - (13-make_description) Moved routine for substituting PACKAGER strings in description files here - it was wrongly located in (14-make_doinst) - (14-make_doinst) Add a switch 'AUTO_RC_LOCAL' to make it possible to disable automatic addition of code to doinst.sh which adds code to rc.local. - (FUNCTIONS), (DEFINES), (src2pkg.conf.new), (src2pkg), (trackinstall), and man-pages Updated version to 2.2 - (09-fix_pkg_perms) Move libtool *.la file-removal routine to (14-last_minute_details) as this must be done after segregate_package so that the files are always included in any devel package. In (14-last_minute_details) let the routine be an option called: REMOVE_LIBTOOL_FILES which can be set with REMOVE_LIBTOOL_FILES=YES or REMOVE_LIBTOOL_FILES=1 (DEFINES) Added default REMOVE_LIBTOOL_FILES=NO - (14-last_minute_details) moved segregate_package here from (15-make_package) since it gets called from here. Changed the package-split routine for 'devel' packages to *copy* instead of *move* libtool *.la files into the devel package. This allows more flexibility with *.la files in case the user wants to have them removed by default from the main package. - (usr/src/src2pkg/src2pkg-helpers/src2pkg.setup) Fixed erroneous format of debian packages. Also fixed in the src2pkg.build-noarch script. - (15-make_pkg_deb) Fixed erroneous format of debian package creation. (DEFINES) add export COMP_EXT so that find (and tar) can use it when creating deb packages - (14-make_doinst) Add warnings when unsatisfied_deps or unfound_depends are detected. Move write_* postrm routines out of doinst loop. Exclude Available extensions from glibc-info output in write_meta_data and add binutils version - (/usr/bin/src2pkg) Correct typo 'FOURCE' to 'FORCE' for forcing rebuild of helpers. Check for /usr/libexec/src2pkg/lib/libsentry.so instead of /usr/libexec/src2pkg/bin/tar-1.13 when detecting installation of src2pkg-helpers. On rpm or debian systems tar-1.13 should not be required. (01-pre_process) Suppress warning of missing tar-1.13 except on Slackware/KISS systems. (src2pkg.setup) Use HELPERS_DEST_DIR instead of PKG_DEST_DIR to avoid conflicts when a user has set PKG_DEST_DIR to some fixed path. Strange that PKG_DEST_DIR was not working since it was set explicitly at the beginning of src2pkg.setup. - (src2pkg.setup) and (src2pkg-helpers.src2pkg) made these scripts exit if libsentry fails to build. - Upgraded to src2pkg-helpers-1.1. to use upgraded libsentry-0.6.9 - exit with status 1 from sb2sp, src2pkg and trackinstall when unrecognized options are given - (07-compile_source), (DEFINES), (src2pkg) add feature for running 'make check' after compiling sources, if requested. Activation using the default command with the command-line switch: '-CHECK' (or CHECK_BUILD=YES in the conf file). Or, to use some other command, specify using the -t='check-command' or --test_command='check-command' option from the command-line (or using the 'CHECK_COMMAND=check-command' syntax in either the conf file or NAME.src2pkg build script. Thanks to Jeremy Adelsgruber (pizzasgood) for the suggestion and preliminary patch. Updated src2pkg.1 man-page to reflect the addition, and added default setting to DEFINES and added a commented line to set EXIT_ON_CHECK_FAILURE to YES in the conf file. - (11-create_docs) fix removal of empty doc directory after moving docs - (07-compile_source) Check for valid CHECK_COMMAND in MAKEFILE to avoid false error message if such CHECK_COMMAND(typically 'make check') is not present in MAKEFILE. This is only checked if the MAKE_COMMAND begins with 'make'. - (08_destdir_install) Run tracklist directly, unless VERIFY is preset to something else, to allow for proper redirection to the log file or echoing to stdout. - (06-configure_source), (07-compile_source), (08-fake_install) Create the LOG_DIR if needed - (08C-real_root_install) fix backup of links when using SAFE method. - (06-configure_source) As a last-ditch-effort, use autoreconf -if to generate configure script BUILD src2pkg-2.2-noarch-1 (15 Apr 2010) - (DEFINES) (01-pre_process) Add COMPAT_NAME_PREFIX for use with multi-lib systems where 32-bit packages have a prefix added to the name. Works just like COMPAT_NAME_SUFFIX and both can be used together when desired. BUILD src2pkg-2.2-noarch-2 (16 Apr 2010) - (07-compile_source) and (08-fake_install) check explicitly for 'No rule to make...' when checking for the existence of Makefile 'install' or 'check' rules. - (16-post_process) fix expr error when calculating installed/compressed package sizes Thanks to Ilya Utemov for spotting and reporting the error. - (01-pre_process) Use raw uname -m output as a last-ditch setting for ARCH, if no specific matching arch is found. Someone was trying to get src2pkg working on Yellowdog ppc64 and ARCH was not being set, so rpmbuild was failing. RELEASE src2pkg-2.2-noarch-3 (16 May 2010) Version-2.1 03 Jan 2010 - (11-create_docs) Use '-maxdepth 1' when searching for xpm/png/svg images except when searching SRC_DIR. More lenient checking of xpm size when determining whether or not to resize an image. - (13-make_description) in read_deb_desc ignore text CHUNK if it consists of a single '.' Change search order for files which may contain description so that debian/control preceeds *.lsm files. lsm files are likely to be old and outdated. Use $(echo $HOMEPAGE) and $(echo $LICENSE) to eliminate leading space - (14-make_doinst) make the routine which writes update-desktop-database commands into the postinst scipt into a re-usable function callable from anywhere and add a similar routine to add code to a postrm script. These functions are named: write_update_desktop_database_postinst and write_update_desktop_database_postrm * renamed write_install_info and write_delete_info to match the convention above: write_install_info_postinst and write_install_info_postrm Changed call to these functions in (15-make_package) * Same done for update-mime-database and gtk-icon-cache command routines: write_gtk_update_icon_cache_postinst, write_gtk_update_icon_cache_postrm write_update_mime_database_postinst, write_update_mime_database_postrm The 'postrm' routines are only done if EXTENDED_DATABSE=YES and if running kiss-linux * fix faulty addition of '|' when NEXT_DEP is null. * add code to edit any PKG_DESC file to change the PACKAGER when necessary. This lets you use desc files which have "Packaged by src2pkg" and have it changed to: "Packaged by $PACKAGER" - update to libsentry-0.6.7.9 Several changes made in libsentry for compatibility with later versons of glibc, plus addition of more *at functions. Updated src2pkg-helpers version to 0.8. - updated version numbers in src2pkg trackinstall and man-pages. - (src2pkg) Only update scripts (-U option) if they need it, by checking VERSION and SOURCE_NAME first. Make src2pkg output sensible exit status to make it easier to use with driving scripts. - config.guess and config.sub don't arbitrarily append '-gnu' to the OS ID - (01-pre_process) fix fallback to SAFE method when INSTALL_FAIL= JAIL, DESTDIR or UNION Add 'arm' and 'armel' to get_flags - (03-make_dirs) remove any leftover 'unfound_depends' files - (08-fake_install) Add check for INSTALL_TYPE=SAFE. Improve handling of INSTALL_LINE when explicitly given and checking of DESTDIR support. - (09-fix_pkg_perms) Add routine to remove *.la files if --disable-static was passed, or if no static libs (*.a) are present. In DEFINES, add a default setting of CORRECT_LIBTOOL_FILES="NO" which can be overridden from a script or from the command-line. We'll try this behaviour for a while and see how it goes. - (11-create_docs) Add a routine to correct the location of pkgconf *.pc files from usr/share/pkgconfig to usr/lib${LIBDIRSUFFIX} and a routine to check and correct the *.pc files themselves as it seems to be pretty common that they do not respect libdir settings on 64-bit builds. - (14-make_doinst) Add the ability to handle *.new files under var (in addition to etc) as there are some builds which install new log files under var which should be handled with config() routines in the doinst.sh. Add a routine to write update-gtk-immodules routines to doinst.sh files. Get rid of leftover deps_list.tmp when creating dependency lists. Add a loop to the gtk-update-icon-cache routine to check each icon directory. - (14-last_minute_details) ignore empty '__init__.py' files - (16-post_process) Don't remove Resources directories when cleaning up. The routine proved problematic when used with a driving script. The code has been commented instead of removed, for further checking later. I alwas use a $NAME-patches directory for individual packages, but needed to use a single directory for whole groups of (X) packages, so I tried using Resources. But, when running with the src2pkg -W option the dir was getting cleaned up even when there was no Resources.tar.bz2 present. More sane exit-status reporting to make things work better with a driving script which needs to know whether src2pkg succeded or not. - (FUNCTIONS) More sane exit-status reporting from trap functions - (08C-real_root_install) Add separate prompt for SAFE method - (15-make_package_slack) fix typo (ADM_DIR_NAME/prequired ADM_DIR_NAME/required) - BUILD src2pkg-2.1-noarch-1 (Jan 05 2010) - (14-make_doinst) Quieten error output when PKG_DIR/etc or PKG_DIR/var is not present (when searching for *.new files to process) Fixed some issues in libsentry which were preventing successful compiling on systems with glibc>=2.10 and also missing READLINKAT defines for 64-bit systems. Updated to libsentry version 0.6.8. - BUILD src2pkg-2.1-noarch-2 (Jan 09 2010) - Apply several fixes to coreutils, tar-1.13 to fix compilation errors with glibc-2.11.1 and gcc-4.4.x. Applied one fix each to libsentry and unionfs-fuse to quieten warnings when compiling with gcc-4.4.x. Keeping the same libsentry and src2pkg-helpers versions as above since only 2-3 people have received testing version src2pkg-2.1-noarch-2 - BUILD src2pkg-2.1-noarch-3 (Jan 10 2010) - (14-last_minute_details) ignore files which are chmodded 444 when searching for files with unusual perms or ownership. Use 'stat' instead of ls to retrieve file information. Ignore hidden '.packlist' files. - (config.guess) and (config.sub) Add code which explicitly identifies Slackware and KISS systems - reworked sources and build scripts for src2pkg-helpers to fix more 64-bit errors. Updated src2pkg-helpers version to 1.0. All the patches for tar-1.13 and coreutils-5.2.1 have been pre-applied to the sources to simplify building and debugging. The src2pkg-helpers.src2pkg and src2pkg.setup scripts have been streamlined and better error-handling added to improve diagnostic output. However, only libsentry is mandatory for a successful build of the package. Hopefully, everything will now build on all the various systems. But, even if building tar-1.13 and/or coreutils fail, the errors are not fatal, as src2pkg can always use the versions installed on the system. Removed the '-static' flags from the CFLAGS for tar-1.13 as this was causing build failure on 64-bit systems. Many thanks to Matteo Bernardini for steadfastly helping to find build errors for 64-bit Slackware systems. Thanks also to Yonggang Guo, Marek Allvee and other who reported erros and tested pre-release versions. - (01-pre_process) Don't translate underscores before trying to get the ARCH from binary RPM package names. Doing so meant that x86_64 was getting turned into simply '64'. The name-guessing routine for rpms could use a general overhaul, but it takes a special frame of mind to work on *that* code, so we'll let it go for now. At least now the ARCH can be correctly detected, and the other elements name and version can be overridden from the command-line. This code for the conversion of binary rpms is very little used, so most people won't notice... Thanks to Chad Parker for reporting the error. - BUILD src2pkg-2.1-noarch-4 (Jan 13 2010) - (usr/bin/src2pkg) If src2pkg --setup is run, but src2pkg-helpers version is current, then exit with this comment: "Run: 'FORCE=1 src2pkg --setup' to force build." - (01-pre_process) Correct smale typo in LDFLAGS - (usr/src/src2pkg/src2pkg-helpers/src2pkg-helpers.src2pkg) and (usr/src/src2pkg/src2pkg-helpers/src2pkg-helpers.src2pkg) 64-bit build fixes for unionfs-fuse and other small fixes. - BUILD src2pkg-2.1-noarch-5 (Jan 14 2010) - (06-configure_source) Don't reset DESTDIR to JAIL when using perl Makefile.PL as these seem to work with DESTDIR. - (14-make_doinst) Add handling of BuildRequires (or BUILD_REQUIRES) to routine which generates the PKG_REQUIRED file. This variable (either syntax) can be included in a src2pkg build script or passed to src2pkg as an environmental variable. The information will then be included in the PKG_REQUIRED file for use by other tools. Since these 'other tools' don't exist yet, the syntax for this variable is still in flux, but probably should be a comma-spearated list of packages so that something like this can be easily parsed: BuildRequires='gcc-g++,libxml2 >= 2.6.26,openssl' - (06-configure_source) Add '-DLIB_SUFFIX=${LIBDIRSUFFIX} -DCMAKE_BUILD_TYPE=Release' to the default options passed for cmake builds. - BUILD src2pkg-2.1-noarch-6 (Jan 15 2010) - (FUNCTIONS) When generating a src2pkg script, write the PRE_FIX variable uncommented if it is not set to the default '/usr'. - (06-configure_source) Use libdir=$PRE_FIX/lib when automatically adding libdir option, if libdir is not already set. - Added a section to the 'Usage' file on building packages using some other prefix besides /usr - (trackinstall) Fixed a couple of spots in the options-parser which were out of sync with the options used by src2pkg (missing -DEST and incomplete -SAFE) - BUILD src2pkg-2.1-noarch-7 (Jan 17 2010) Re-release this build as the final 2.1 version. All the 64-bit/glibc/gcc problems seem to be now fixed, as reported by the various testers. Version-2.0 07 Sep 2009 - (13-make_description) Favor using *.lsm files before description-pak files. - (08-fake_install) Silence output of rmdir when trying to remove $PKG_DIR/usr/lib/X11/app-defaults and remove the parent dirs $PKG_DIR/usr/lib/X11 and $PKG_DIR/lib if they are empty. - (08-fake_install) and (15-make_package) Suppressed interactive routines for removing existing PKG_DIR and/or PACKAGE content when resuming. It could be made an option, but seems pointless. - (DEFINES) Set default DESC_MAX_LINES back to 11. - (09-fix_pkg_perms) Make sure $PKG_DIR/var is chmodded 755 if it exists. - (13-make_description) Fixed the routine to write the correct number of lines taking into account the text length and whether LICENSE and/or HOMEPAGE are found. - (13-make_description) Silence errors from grep when ftp/http address is not found in debian/copyright file or file is not present, and if so, try to get the 'Homepage' info from the debian/control file. - (06-configure_source) Added '--cache-disable' and confdir=$sysconfdir/ to the options used by scons when configuring sources. Need to look at a better way to install scons-based sources. See belpic(beid) 2.6.0 sources for a broken example. Add some lines to clean up stale temporary files created by scons before running. - (08-fake_install) in post_fake_install fixed notification of removal of usr/X11R6 to only notify if the dir/subdirs have no files. The correct action was being taken but the prompting was incorrect. - (14A-last_minute_details) Added a mechanism for aborting package creation when 'incorrect' or potentially dangerous directories are created in the package. This problem was pointed out by name-here while building 'codelite' and I just had the same problem with another source 'gcal'. The Makefile for gcal installs the file $HOME/.gcalrc and codelight installs a desktop file in $HOME/Desktop. For name-here, who was building the codelite package as a normal user, the package, when installed change the ownership of his $HOME directory to root. This happens because during creation of the package tar archive, all perms are changed to 'root', when building the package as a normal user. These sort of errors were already reported by src2pkg, but the solution is now, by default, to make src2pkg abort package creation when these things happen. A new configuration option was added to the src2pkg.conf and DEFINES files which allows the default behaviour (abort the build) to be overridden. When src2pkg checks the package sanity, there are several conditions which can cause BAD_DIRS to be set: 1. FHS_POLICY is set to SLACK or LSB but package contains /usr/etc directory 2. FHS_POLICY is set to SLACK or LSB but package contains /usr/var directory 3. package contains /usr/local directory but PRE_FIX is not /usr/local (or subdir of usr/local) 4. package contains the users $HOME directory 5. package contains redundant or recursive directories which may cause problems or are simply not supposed to be there( $PKG_DIR/usr/usr, $PKG_DIR/$PKG_DIR $PKG_DIR/$SRC_DIR $PKG_DIR/$PRE_FIX/$PRE_FIX) Cases 1 and 2 are not really fatal, but indicate the need to pass correct options to the configure script to correct the non-standard locations. Case 3 indicates problems with the sources Makefile or the users manually scripted code and is also not fatal, but definitely bad form. Usually the Makefiles will have been corrected by src2pkg to eliminate references to /usr/local unless PRE_FIX=usr/local Case 4 is a bad one and should nearly always be considered fatal -although I know one user who packages programs which install under his $HOME dir -he can use the conf file override to change the default behaviour. Case 5 represents several cases which usually happen when DESTDIR support is flawed or only partially implemented. They can usually be avoided by choosing a different INSTALL_TYPE such as 'JAIL'. All these conditions already caused src2pkg to print warnings, but it seems better to have it abort the build to avoid messy situations with casual src2pkg users. I'll have to review and re-consider the problem over time to see whether or not to allow builds to continue in the above non-fatal cases. - (03-make_dirs) added unsatisfied_deps_list to temporary files removed when starting - (01-pre_process) Use ARCH=$MYARCH instead of trying to guess ARCH again for generic binary package conversion (see seamonkey-1.1.18.en-US.linux-i686.tar.gz) Added a new name pattern(Case 2A) to NAME/VERSION detection for generic sources for a pattern like this: APLHA-DIGIT_DIGIT (source name was something-1_23) - Include a copy of the gettextize program script in src2pkg with a very slight modification. gettextize includes a useless interactive routine which won't let it simply run and finish it's work. the copy included with src2pkg has the two lines commented out which prompt the user and wait for a response. This is the easiest way to keep the bash 'read' command from making configuration hang when running in QUIET mode. This will not interfere with manual usage of gettextize since the private copy gets installed in the private src2pkg path /usr/libexec/src2pkg/bin. gettextize is usually called when an autogen.sh script is run, or rarely, during normal configuration. Silencing it this way is cleaner than toggling the QUIET option so that the user can see the prompt if running in QUIET mode. - (11-create_docs) fixed *.png naming when re-sizing them. Add a variable EXTRA_DOCS which lets you specify certain extra files to add to the package, without having to list all the wanted docs with DOCLIST. This allows all the other routines which the normal docs to do their work and still be able to append docs.(First try: aide-0.13.1) - (sb2sp) Only generate Copyright if the original script has it. - (08-fake_install) Finally found a way to implement a better routine which checks for a valid INSTALL_RULE without wasting loads of time. Long ago, we tried simply grepping for $INSTALL_RULE in the $MAKEFILE, but this is really not reliable as the INSTALL_RULE may be hiding in some file which is included by the MAKEFILE. Then, we used to run the '$MAKE_COMMAND $INSTALL_RULE' and wait till it finished in order to get the exit code. But, sometimes 'make install' can run for a very long time. Until now I could never figure out how to check for the three conditions: A. process failed B. process succeeded quickly C. process is still running and, hence, is succeeding. The problem was how to detect condition 'C' and be able to kill the process rather than wait for it to finish. Finally found a way which gives the desired result, so that if '$MAKE_COMMAND $INSTALL_RULE' is succeeding, the process will be killed after one second -one second seems to be enough, but we may need to increase the time. Use 'kill -INT', not 'kill -KILL' - (12-compress-manpages) force decompression of man-pages and info files - (11-create_docs) check for existence of files before trying to chown them - Added support for building debian *.deb packages. This involved changes in (/usr/bin/srcpkg), (/usr/bin/trackinstall), (DEFINES), (03-make_dirs), (13-make_description), (15-make_package) and the man-pages were updated. This is still fairly basic support for gzipped content only and there is no handling of postinst scripts or other debian specific files -other than the control and md5sums files. There is also a new option for DEB_COMPAT added to the default /etc/src2pkg/src2pkg.conf file. - Added support for creating Puppy *.pet packages. Changes similar to above as for debian *.deb packages. The src2pkg.setup script was also modified to allow for creating and installing a pet package on Puppy Linux or manually building and installing src2pkg-helpers on other systems. - Added INIT_DIR variable instead of hard coding /etc/rc.d directory - Updated libsentry version to include tracklist in the sources. - Updated to src2pkg-helpers-0.6 to include newer version of libsentry and to add another patch to tar-1.13 sources. i am using automake-1.10 now and compiling tar-1.13 with automake-1.10 fails, so the Makefiles have been modified to not run automake in the sources. - Updated version number in src2pkg and trackinstall - (src2pkg) Use eval (carefully) to retrieve BUILD number from scripts for use by -BUMP option. The -BUMP option will increment the BUILD number by '1' and edit the build script to update the BUILD number. - BUILD src2pkg-2.0-noarch-1 (Oct 26 2009) - (01-pre_process) Use a different method to re-read the first part of a src2pkg script which doesn't rely on eval. Grepping for the EXTRA_CONFIGS and other lines didn't work if the lines spanned more than one line (with \ esacpes) Instead, use grep to figure out where the line starting with '# Get the functions' is, then use head to write the lines of the script to a temoprary file and re-source them from the temp file. This avoids using eval and also works for multiple-line variables. A temporary file is created for this and then immediately removed, but lines are added to (03-make_dirs) and (16-post_process) to remove the temp file if it somehow didn't get removed. - src2pkg.setup Check for /etc/puppyversion to decide whether to build and install a *.pet archive of the src2pkg-helpers, when running 'src2pkg --setup' - remove call to printenv from (FUNCTIONS). This command is unavailable on some minimal systems. I was in doubt about the need for this call anyway(to unset any lingering 'RET_*' variables. Also removed the (already-commented) code for unsetting any '*FLAGS' variables. I want the user to be able to set or pass any CFLAGS/LDFLAGS, etc, in the same way they may already be used to. We do retain the 'unalias -a' command as we *don't* want any user-defined aliases being used. It would be useful here, to define a couple aliases ourselves -in rare cases, Makefiles may have paths to some key binaries hard-coded (like /bin/cp, etc). Since src2pkg wants to use its' version of these key programs, we could try aliasing, for instance, /bin/rm to /usr/libexec/bin/rm. - Added routines to optionally split 'pet' packages, separating any development or i18n (nls or language) files into separate packages if they are present and the option to do this has been chosen. The new option syntax for the src2pkg program is like this: --splitpkg=???? where ???? is either 'devel' and/or 'nls'. If both are specified they should be separated by a comma like this: '--splitpkg=devel,nls' This option only works for pet packages at this time. Code was added to (03-make_dirs) and (016-post_process) to do any cleanup of leftover files when necessary. Code also added to (01-pre_process) to create DEVEL_PKG_NAME and I18N_PKG_NAME. Option was added to the man-pages for src2pkg and trackinstall. - Re-arranged the SAVE_SPACE options in src2pkg and trackinstall so that Z1 uses bzip2 for compressing man-pages, Z2 compresses binaries, Z3 links to a common license file and Z4 creates a tar.bz2 archive of the documents. Updated man-pages to show the change. - (01-pre_process) Changed default FHS_POLICY to SLACK for pet packages. This should encourage saner packages for Puppy Linux. - (src2pkg) Use eval to (carefully) retrieve the BUILD number for use with the -BUMP option. Using -BUMP causes the BUILD number to be incremented by '1' and the src2pkg script to be edited to record the change. Updated the src2pkg.1 man-page to reflect the change. - Completely re-wrote all the documents - BUILD src2pkg-2.0-noarch-2 (Oct 29 2009) - (src2pkg.setup) Search for both /etc/puppyversion and /etc/DISTRO_SPECS to accomodate recent versions of Puppy when running 'src2pkg --setup' - (05-fix_source_perms) add support for patches compressed using 'xz'. Also allow patches which do not have 'patch' or 'diff' in the name, but a PATCHLIST cannot be automatically generated for these. - Copy the slack-desc file into the DOC_DIR when creating pet archives, changing the name to $NAME.desc - (13-make_description), (14-make_doinst) and (16-post_process) Use 'objdump' instead of 'ldd' to create dependency lists. This is done indirectly by a small script named '_ldd' which is included under /usr/libexec/src2pkg/bin. It would be even faster to use an internal function named _ldd, but since it is getting called by 'xargs' that is not possible. Still, _ldd is faster than using the real 'ldd'. It also has two more important advantages - objdump does not execute the binary being examined, so it is safe from possibly malicious code, and objdump does not show 'false postives'. (If a program has been linked to a library which it doesn't really use, ldd will show that lib as a dependency, wheras objdump will not.) Our _ldd formats the output more simply that 'ldd', so we are also able to same some calls to 'cut' and the src2pkg function white_out. - (src2pkg-dnd AppDir) Changed the deafult behaviour when dropping tarballs onto the AppDir so that it tells src2pkg to write a script, instead of building the sources. This should encourage users to use a build script. - (14-last_minute_details) Added a check for faulty packages which contain the file(s): bin, sbin, PRE_FIX/bin or PRE_FIX/sbin. These erros are much more common than we'd like and come about from Makefiles which don't properly create the installation directory before copying/installing the file there. Even though installation of these packages should fail to overwrite the directory with a (bad) file, the package is still invalid and so the package creation should be aborted. (reference wmressel-0.8) - (trackinstall) Add the -BUMP option to trackinstall -as above for src2pkg - (src2pkg) and (trackinstall) Add an option '-CWD' to set all build locations to the current directory. This is the same as setting: SOURCES_DIR="$CWD" SRC_BUILDS_DIR="$CWD" PKG_BUILDS_DIR="$CWD" PKG_DEST_DIR="$CWD" BACKUP_DIR="$CWD" in the src2pkg.conf file. The default setting sin the src2pkg.conf file set all these (except SOURCES_DIR) to /tmp, the -CWD option provides an easy way to override those settings without having to edit the src2pkg.conf file. This should be a useful setting to recommend using when people are having trouble or are taking the src2pkg Tutorial, as it allows for much easier viewing of the PKG_DIR and SRC_DIR contents. Added to man-pages. - removed commented code for compress_libs function - BUILD src2pkg-2.0-noarch-3 (Nov1 2009) - (08-fake_install) Check for CMAKE_INSTALL_PREFIX before DESTDIR to ensure that the special-case usage of DESTDIR for cmake is used and not 'normal' DESTDIR which treats DESTDIR and PRE_FIX separately. CMAKE_INSTALL_PREFIX includes PRE_FIX. (reference gmsh-2.4.2 using cmake 2.6.4) If INSTALL_TYPE is either JAIL or UNION installation fails. (06-configure_source) has been overriding JAIL to use DESTDIR for a long while now, but was failing here because of the case above, where DESTDIR got detected before CMAKE_INSTALL_PREFIX and wasn't using the right path, resulting in PKG_DIR becoming part of the package. Luckily, our BAD_DIRS detection routines catch this and abort the build. - (14-make_doinst.sh) Quieten error output in gen_deps list when $PKG_DIR/install/$PKG_PROVIDES is not present. - BUILD src2pkg-2.0-noarch-4 (Nov 3 2009) - e2fsprogs makes a really excellent example for showing 19 kinds of breakage... (08-fake_install) parse INSTALL_LINE to separate make options from make rules. (14-last_minute_details) make an exception for PRE_FIX="" or PRE_FIX="/" when checking for redundant dirs like $PKG_DIR/$PRE_FIX/$PRE_FIX as these values give a false positive. (01-pre_process) dont' trim leading '/' from PRE_FIX if the PRE_FIX=/ and replace any double slashes with single slashes (14-last_minute_details) Add *.a files to PERM_EXCLUDES list -these are often chmod 444, so no need to scare the user by reporting these as 'unusual' - (09-fix_pkg_perms) Added a routine (replace_hardlinks) which replaces hardlinks with symlinks. It runs in the BIN_DIRS before building file lists, and is also used later in (12-compress_man_pages) to eliminate hardlinked man-pages. These are the only locations I've ever seen hardlinks in a package, but if more are discovered they can be added. - (09-fix_pkg_perms) Added a routine which moves and *.a, *.la or pkgconfig files found under PKG_DIR/lib to PKG_DIR/usr/lib or PKG_DIR/PRE_FIX/lib if PKG_DIR/include is found move it PKG_DIR/usr/include or PKG_DIR/PRE_FIX/include - (14-last_minute_details) Add routine to check for PKG_DIR/share. If found then BAD_DIRS is set and the user is prompted to add --datadir=/usr/share to the configure options. We can't just move the directory because the path to any files there may be hard-coded into the program. - (05-fix_source_perms) Move the routine which replaces config.guess and config.sub to *after* the patching routines. Debian patches nearly always alter these files, so replacing them before patching was causing patch failures with debian patches. While we're at it, if PKG_FORMAT is "deb", don't replace them at all. - (11-create_docs) Added a DOCLIST=MINIMAL option which limits the installation of documents to any README*, readme*, License* and GPL* files. EXTRA_DOCS can still be used on top of this. DOCLIST=MINIMAL can be set from the command-line (-d=MINIMAL) or in the src2pkg.conf file. (14-last_minute_details) don't create a list of compressed binaries if DOCLIST=MINIMAL. - (DEFINES) Change to use JAIL as the default INSTALL_TYPE and (08-fake_install) to use JAIL as the fallback if DESTDIR is 'None found' - (11-create_docs) Add SRC_DIR to SEARCH_PATH for NAME.html files - (src2pkg) and (15-make_package) Add preliminary support for creating rpm packages. We setup $HOME/.rpmrc and $HOME/.rpmmacros files which allow packages to be placed under src2pkg's PKG_DEST_DIR. If you want them to go to the normal rpm locations you'll have to edit the $HOME/.rpmmacros file to change the location. rpm's built as a non-root user will have all the files set to the owner/group of the user who builds the package -which you probably do *not* want. So, you'll probably want to build rpm packages as root. This is still very safe, though, as only the commands needed to build the package are run and nothing is installed using rpm. As with the creation of debian or pet packages, src2pkg builds the package with the same 'mature' code used for creation of Slackware-type packages. This means that the code is versatile and well-tested -creating alternate types of packages will not run any dangerous procedures. - BUILD src2pkg-2.0-noarch-5 (Nov 10 2009) - (09-fix_pkg_perms) Add *.hh files to list of header files generated - (15-make_package) Made --splitpkg work for Slackware-type packages. This still needs work regarding the PKG_SUPPLIES list which is generated for the main package before splitting the content. - move segregate_package from (15-make_package) to (09-fix_pkg_perms) to be done before generating file lists. Add 'solibs' to --splitpkg -unlike the other options this one *copies* the files into a new PKG_DIR instead of moving them. Add routine to segregate_package for this. In (14-make_doinst), make 'make_doinst_links work with any PKG_DIR passed to it, so we can use it for the SOLIBS_PKG_NAME. Add SOLIBS_PKG_NAME to (01-pre_process). This is now working, but still only for Slackware-type packages. - (14-make_doinst) In gen_deps_list, loosen restriction on names of required packages so that names like NAME-solibs don't get skipped over(see lines 491-492) - (15-make_pkg) Add intl man-pages to I18N packages - (14-make_doinst) Use all relative paths for usr/bin/gtk-icon-cache, usr/bin/update-mime-database, usr/bin/install-info and usr/bin/update-desktop-database routines. - (15-make_package) Add package-type "PET2" for Puppy 'woof' packages -the only difference is in the pet.specs database name and content. Option added to (src2pkg). Do all packaging and database creation from a single routine mini_create_pet. - (06-configure_source) Add support for configuration/compiling using 'waf'. - (15-make_package) Add support for creating slitaz '.tazpkg' archives (10-pre_process) (src2pkg) (trackinstall) Add support for tazpkg archives (13-make_description) Add a small function pkg_desc_to_text for use in converting PKG_DESC files back to plain text - Package splitting is working for all but rpm's - methods have been added to create installable '.deb', '.pet', '.rpm' and '.tazpkg' packages of src2pkg. - BUILD src2pkg-2.0-noarch-6 (Nov 14 2009) - (01-pre_process) Use an installed file to check the src2pkg-helpers version instead of relying on a databse entry to determine if src2pkg-helpers is already installed or needs to be updated. The routine in the src2pkg doinst.sh file was also changed to use this new method of detecting the version of src2pkg-helpers. - Complete re-write of src2pkg.setup to be able to build any of the supported package formats, or do a generic installation of src2pkg-helpers. - re-write the src2pkg.build-noarch script to create installable packages of src2pkg for each supported format: tgz, deb, rpm, tazpkg and pet. - (FUNCTIONS) and (08-fake_install) Read in the separate functions for INSTALL_TYPE as needed instead of loading all the functions. This saves about 400K RAM. The files 08A*, 08B*, 08C* and 08D have been moved to a subdiretcory of the SRC2PKG_LIBDIR to avoid clutter. - (15-make_package) Separate the various package-creation functions into separate files to avoid loading un-needed functions -this means 5 new files in SRC2PKG_LIBDIR but makes the code easier to read and saves about 400K RAM. The new files are placed in a subdirectory of SRC2PKG_LIBDIR to avoid so much clutter. - Finished package splitting for rpm's, so we've gone from being able to create one type of package to being able to create 20 package types -5 package formats with four package type for each: main, devel, i18n and solibs. No -make that 25 as I've added an option to --splipkgs to split most documents out of the package. I say 'most of', because even if the documents are split out, a copy of any LICENSE or README files (or any of the common variants) will remain in the main package. We don't want to encourage the creation of packages without them. Updated man-pages to reflect the changes. - The documentation for src2pkg has been completely rewritten. Hopefully it is clearer, more concise and more helpful for both beginners and advanced users. - (13-make_description) Look for Homepage in debian/control before looking in the debian/copyright file. - (FUNCTIONS) In 'write_src2pkg_script': if BUILD=1 write the line commented and write ARCH= line uncommented unless ARCH=noarch - (08B-jail_root_install) don't do generic installation if normal installation fails and the 'keyfile' is setup.py -that is don't do generic installation of python modules. - (14Alast_minute_details) Check for PKG_DIR/TRANSL directory and signal BAD_DIRS if found so that package creation gets aborted. - (11-create_docs) Don't check for *.pc files in sources if one is already installed. Don't check for *.desktop files in sources if one is already installed. Suggested by Tim Goya. The routines still look in the CWD and other patches locations, so that any files found there will be installed over existing ones. This ensures that if the user has a corrected file it will be used instead of the installed one. - (06-configure_source) (01-pre_process) Add ability to use EXTRA_LDFLAGS and also to be able to disable LDFLAGS entirely by using LDFLAGS=none. Option added to src2pkg.conf file with an example for creating smaller binaries. Also added a line and note about changing PRE_FIX to the src2pkg.conf file - (04-unpack_source) Use exploderpm instead of disrpm for rpm or deb archives. Some newer rpm's are now using xz compresssion which disrpm cannot handle. exploderpm is a util I put together using code from disrpm and from the tukaani pkg-tools explodepkg util. Changed src2pkg.build-noarch to install exploderpm instead of disrpm - (src2pkg) When using the '-U' (update) option with the name of a source tarball, update an existing NEAME.src2okg or NAME.src2pkg.auto script with the new tarball name and version. Can be used with -X to execute the updated script. - Updated Copyright dates throughout. - BUILD src2pkg-2.0-noarch-7 (Nov 25 2009) - (03-make_dirs) fix finding of existing packages for deletion - (09-fix_pkg_perms) fix errors in replace_hardlinks when inode.list is empty - (14-make_doinst) fix package name lib_gcc (not libgcc) - (sb2sp) write BUILD and PRE_FIX lines commented unless needed - (06-configure-source) Add 'unix' to list of possible subdirs where conf files should be searched. Suggested by compiling 'putty', but included becasue this is not the first time I have run across this being used. Thanks to Puppy user 'pakt' for suggesting this. - (11-create_docs) Add a switch for disabling installation of *.new files. Setting AUTO_DOT_NEW=NO disables the routine which searches for *.new files in the CWD, PATCHES_DIR (and other such locations) and installs them under /etc. I've been building some basic system packages (like sysvint and syslog) which manually install some *.new files and the automatic routine interferes -specifically: sometimes these files get installed under /var/log or other path besides /etc, so the routine would then wrongly copy files into /etc. Probably need to re-design the routine to check if the files have already been installed and to handle other locations besides /etc ... - (01-pre_process) Implemented a routine for vetting INSTALL_TYPE's which are known to fail with certain packages. By setting INSTALL_FAIL in a src2pkg script to any/all INSTALL_TYPES which fail for the package, src2pkg will set the INSTALL_TYPE to the next safest method for building the package, if necessary. For example, if a package is known to fail using DESTDIR, then putting INSTALL_FAIL=DESTDIR in the script will cause src2pkg to use JAIL, unless some other method besides DESTDIR or JAIL is already specified. The logic of the routine is a little tricky, but the order of precendence is: JAIL, DESTDIR, UNION. If both DESTDIR and JAIL fail, then the package must be built as root and normal users will be notified of that. The REAL and SAFE methods never fail, so if one of them is already set as the INSTALL_TYPE, then no changes are made. - BUILD src2pkg-2.0-noarch-8 (Nov 29 2009) - (13-make_description) When using debian/control file to create description, use the first line of 'Description:' as BLURB_1 - (04-unpack_source) Add *.tbz2 and *.tar.lzma to source types handled - (08-fake_install) Add INSTALL_PREFIX to DESTDIR types (openssl) - (08-union_root_install) Use fusermount to unmount UNION_DIR. Remove UNION_DIR and EXCL_DIR_NAME (using rmdir) when interrupted. - (15-make_package_slack) Use existing slack-desc files for split packages, if present. - (15-make_package) Copy 'etc' dir into solibs package when segregating packages (openssl), and only generate doinst.sh if not already present(for all splitpkg routines). - BUILD src2pkg-2.0-noarch-9 (December 3 2009) - (08A-destdir_instal) When verifying files installed using DESTDIR, ignore entries in the file list which begin with './' or with no leading '/' as they are created relative to the SRC_DIR. - (14-make_doinst) Use ${infodir:1} instead of hard-coded path when writing install-info script fragments. Create a routine which adds install-info --delete code to postrm.sh scripts used by KISS-Linux. Make write_chroot_script more versatile by passing the TARGET_SCRIPT to it, so it can be used for other such routines. - Updated libsentry for use with glibc versions up to 2.12, rebuilt src2pkg-helpers tarball with version 0.7. - BUILD src2pkg-2.0-noarch-10 (December 11 2009) - (14-make_doinst) Fixed THIS_DEP/NEXT_DEP routine to eliminate duplicate listing of deps - BUILD src2pkg-2.0-noarch-11 (December 14 2009) - (14-make_doinst) fix redundant writing of config() routine when there are multiple files which need it. Use generic name PKG_POSTINST instead of doinst.sh and use (directory) DEPTH when referring to the package database. Fix write_chroot_script. - (15-make_package) fix missing argument to mini_installpkg_slack and don't use ROOT as the internal installpkg can only install to the real system, for now. Add some code to handle extra install/* files when running on kiss-linux - fix search-path to libfuse.so in src2pkg.setup and src2pkg-helpers.src2pkg - (DEFINES) set up some sane defaults for KISS Linux package database - Created and included a CREDITS file to more fully acknowledge any substantial contributions or inclusions of Copyrighted code, and to thank those responsible. - (14-make_doinst) In: gen_deps_list Improve sorting of package names while simplifying and speeding up the routine slightly. - In the script src2pkg.build-noarch, which creates installable packages of src2pkg, also create a package especially tailored for KISS Linux. - BUILD src2pkg-2.0-noarch-12 (December 17 2009) - (01-pre_process) alias OPTIMIZE_FOR_SIZE and OPTIMIZE_FOR_SPEED to OPTIMIZE_4_?? - (14-make_doinst) make the routines for writing install-info and 'install -info --delete' into separate functions so that they can be called and used when creating separate 'docs' packages when requested - (15-make_package) in segregate_package: * call write_install_info and write_delete_info routines, if needed, for the docs package. * for solibs packages, copy any PKG_REQUIRED from main package to the solibs package * for devel package, copy any PKG_REQUIRED from main package to the devel package and add the main package NAME to the requireds for the devel package. - (DEFINES) && (01-pre_process) create defaults for a package meta-data file to be included in packages. Default name is slack-meta, so this file is safe to include in packages made for slackware (all install/slack* files get removed by installpkg) For kiss-linux, the file will be name pkg-meta and go in /var/lib/pkgtool/meta_data This file will contain the LDFLAGS, CFAGS, CPPFLAGS, and package-creation date and PACKAGER or SIGNATURE information. Also include the list of any compressed binaries here. - 14-make_doinst create the write_meta_data routine here -it can be called from here just after running last_minute_details, or gets called from the segregate_packages routine for the devel and/or solibs packages. - adjust build scripts to create a KISS txz package of src2pkg - adjust src2pkg.setup to build and install KISS txz package of src2pkg-helpers when running on KISS. - BUILD src2pkg-2.0-noarch-13 (December 19 2009) - (14-last_minute_details) & (15-make_package) only write postrm and *-meta files if EXTENDED_DATABASE feature is being used. In DEFINES, use slack-preinst, slack-prerm, slack-postrm and slack-meta names as defaults for Slackware as this will cause the files to be removed when package is installed using stock Slackware package tools. - (11-create_docs) force-copy pixmaps from CWD or PATCHES_DIR over installed ones. - BUILD src2pkg-2.0-noarch-14 (December 20 2009) - Released as src2pkg-2.0-noarch-14 (December 20 2009) This date also marks the first public release of src2pkg-ng-0.0.1 by Tim Goya src2pkg is a re-write from scratch of src2pkg, which Tim has been working on for about a year. - UPDATE Within a short while of uploading and announcing src2pkg-2.0-noarch-14, Michael Endsley reported two small glitches in the Slackware package of src2pkg. He had done a fresh install of src2pkg on Slackware-13.0 and the new /etc/src2pkg/src2pkg.conf file caused an error when src2pkg was first run. The error came from line 240, which is a line continued from 239 with an escape backslash using single quotes. the syntax works fine on my box, but gave an error for Michael. he also found a glitch in the 'src2pkg --setup' routine which compiles, packages and installs the src2pkg-helpers. I had two functions with the same name in /usr/src/src2pkg/src2pkg-helpers/src2pkg.setup. Since Michael reported these so quickly, I was able to fix the problems soon and upload a fixed Slackware package src2pkg-2.0-noarch-15.tgz and edit the LQ post announcing the new release with the new link. But, it was late here, so I didn't get the other packages rebuilt and all with this ChangeLog entry. - BUILD src2pkg-2.0-noarch-16 (December 21 2009) - Re-released as src2pkg-2.0-noarch-16 (December 21 2009) Version-1.9.9 28 May 2009 - Bumped version number in src2pkg, trackinstall, DEFINES, FUNCTIONS - fixed libsentry version in the (separate) /usr/bin/sentry wrapper installed by src2pkg. - (16-post_process) Fixed cleanup of $NAME-patches directory when using CLEANUP (-W) option and there is a $NAME-patches.tar.gz or $NAME-patches.tar.bz2 archive present. - (03-make_dirs) Add $NAME-test-make-install.log to list of temporary files removed when begining a new build. - (14-make_doinst) Add code which adds a gtk-update-icon-cache routine to the doinst.sh - (08-fake_install) cd into $OBJ_DIR before trying to create "$LOG_DIR"/$NAME-test-make-install.log - (14-make_doinst) Add code which adds a update-mime-database routine to the doinst.sh - (10-strip_bins) make strip commands fully configurable in case someone wants to use sstrip or other tools. Also, show the command being used. Make the commands for stripping static libs separate from those for shared libs. Set the defaults in DEFINES. - (13-make_description) Strip trailing single quote (') from License type when from debian/copyright - (06-configure_source) When building python packages, enable FORCE_ZERO_LENGTH=YES(ALLOW_EMPTY_FILES) Many python packages install empty files named '__init__.py'. I am unsure if these are needed for the programs to work, but they look like place-markers. Until I know better, we'll allow them to be installed. - (11-create_docs) Add PKGINFO and PKG-INFO to list of default documents to install - (08-fake_install) Silence error output when make-file-includes-all is not created. - (14A-last_minute_details) Rearrange package clean-up code to remove empty files first before checking perms and ownership to avoid reporting unusual files which then get removed. - (06-configure_source) Major cleanup of cmake configuration code. This is now always done in a subdir of the sources and PRE_FIX is handled consistently with lots less code. Had to also clean up code in (08-fake_install) which detected CMAKE_INSTALL_PREFIX (as a DESTDIR) so it all plays nicely with UNION or JAIL. - (/usr/bin/src2pkg) Add command-line options for -M32/64 -L32/64/0 (01-pre_process) Simplyify and unify setting of flags in get_flags (06-configure_source) Add code which appends libdir options passed to configure scripts. - (01-pre_process), (06-configure_source), (07-compile_source) and (08-fake_install) Add support for using a unified 'build' function which can replace configure_source, compile_source and fake_install. This makes it easier to create one-off routines which do something really different than most sources. Incidentally, this also means that src2pkg can read 'ports' files and use the instructions also. - (14-make_doinst) (gen_deps_list) Check for both new.slack-provides and slack-provides when checking for in-package dependencies. - (08-fake_install) Add DIST_ROOT to the list of DESTDIR possibilities and remove 'prefix' and PREFIX. These two are simply too unpredictable to use. DIST_ROOT is used by the xfsprogs sources. - (src2pkg) && (FUNCTIONS) Added a routine which converts *.SlackBuild scripts to src2pkg scripts using a 'build' function. The routine is not perfect, but does a pretty good job on most SlackBuild scripts. The majority of Slackbuilds can be easily converted to 'normal' src2pkg scripts by hand. But this automatic routine will extract the most important lines relating to the build. Still, many will need tweaking by hand. The command-line syntax for converting scripts is like this: src2pkg --convert ??.SlackBuild The routine will add the Copyright information to the generated src2pkg.auto script. Most syntax commonly found in SlackBuild scritps is handled, but there may always be exceptional syntax which can't be correctly read by this routine. * Also added a --convert-simple option which will write a 'normal' src2pkg script without a 'build' function for sources which use autoconf -that is, sources which contain a 'configure' script. Otherwise, a script using a 'build' function, as above, is used. (src2pkg-dnd) Add drag-n-drop support for *.SlackBuild scripts. What could be easier? - Added config.guess and config.sub to the /usr/share/src2pkg package directory. These files are taken from the automake-1.10 distribution. These files are forcibly copied over any existing ones in the sources to ensure compatibility of certain sources with slackware64 or other 'modern' arches. The files get copied over in (05-fix_src_perms) - (FUNCTIONS) Added a function created for the MultiSource example, called unset_vars. It unsets most of the src2pkg API variables. This is needed by the routine in (/usr/bin/src2pkg) which executes a generated script after converting from a SlackBuild. - (src2pkg) Added a '-J??' option for controlling the NUMJOBS variable (-j?? option to make). Also made the '-M??' and -L?? (LIBDIRSUFFIX) option work the same way -that is, to accept any arbotrary string value for MACHINE and LIBDIRSUFFIX. - (07-compile_source) Fixed handling of DOC_DIR when converting slackware-type packages. - (01-pre-process) More fixes to handling *.tar.lzma, *.tlz, *.tar.xz and *.txz sources - (08-fake_install) Add BUILDROOT to detected DESTDIR types. Suggested by 'cups' package. - (12-compress_man_pages) Add a routine to remove pre-formatted (cat) man-pages. Search-paths for this should be wider. - Added src2pkg-dnd to the usr/bin programs and a desktop file to usr/share/applications Big thanks to Pieter Sartain for working out the last details to get drag-n-drop support working for, at least, XFCE. This should be working for KDE/GNOME desktops also. Users of ROX-Filer pinboard may still want to use the included app-dir 'src2pkg-dnd.tbz' - BUILD src2pkg-1.9.9-noarch-1 - (11-create_docs) & (13-make_description) - (14-make_doinst) Added chroot-script generation code to install-info, update-desktop-database, gtk-update-icon-cache and update-mime-database doinst.sh routines - (11-create_docs) Handle gzipped xinitrc files. Use find -exec instead of find |xargs for chmodding docs in order to handle names with spaces. - (src2pkg) Add the ability to specify a named function to pause at, similar to the --resume option. --pause=funcname makes src2pkg pause before and after the single named function. - Rewrote code for converting SlackBuild scripts -this code has been written into a stand-alone program namded 'sbs2p' which is called by src2pkg. sb2sp can write either a 'simple' or 'long' version of a translated SlackBuild. The simple version can only be created if the SlackBuild uses an autoconf source archive that uses the './configure' command. - (01-pre_process) By default, set LIBDIRSUFFIX='' when MACHINE is '32', unless otherwsie set. (06-configure_source) only add libdir if it is an available option to the configure script to avoid crashing the configure routine (suggested by the 'wine' program). Added a new src2pkg.conf file setting for COMPAT_NAME_SUFFIX. When building 32-bit programs for a 64-bit multi-lib system, the created package gets the COMPAT_NAME_SUFFIX added to the package NAME. By default, COMPAT_NAME_SUFFIX='-compat32'. This is the suffix used for the 32-bit compatibility packages for Slackware64 supplied by Fred Emmott. Slamd64 uses something else, but it can be set to anything the user likes. (06-configure_source) when echoing LDFLAGS and CFLAGS, include double quotes so the output looks like the real thing and can also be cut-and-pasted, as is. Thanks to Pieter Sartain for finding/suggesting these changes. - BUILD src2pkg-1.9.9-noarch-2 - (08-fake_install) Added support for 'instroot' as DESTDIR type (suggested by newt-0.52.2). - (13-make_description) Allow description files with a configurable maximum number of lines and add $NAME.desc to list of possible description files. - (usr/bin/src2pkg), (01-pre_process) and (04-unpack_source) Added support for plain tar archives which are not compressed. - Because of back problems, I was unable to work 2 months (July & August) during this period. - (06-configure_source) Added $MAKEFILE.top and $MAKEFILE.subdirs to list of Makefiles which get PRE_FIX corrected. This probably ought to use the find_makefile_includes routine from 08-fake_install - (11-create_docs) Fixed XPM resizing code which was adding an extra '.xpm' to the image name. - (src2pkg) Fixed -J=??, -L?? and -M?? options to conform with the rest of src2pkg option syntax by using --jobs=??, --libdirsuffix=?? and --machine=??. Added --cc=?? and cxx=?? options to set the compiler to use, when needed. This should make it much easier to use src2pkg with cross-compilers. For now, the MACHINE and LIBDIRSUFFIX are not written into generated src2pkg build scripts. Updated man-pages to reflect changes. - RELEASED as src2pkg-1.9.9-noarch-3 on September 06, 2009 Version-1.9.8 30 January 2009 - (01-pre_process) fixed a bug when checking CURRENT_HELPERS_VERSION, formatting and comments in the name-parsing code. - (14-make_doinst) when copying new PKG_REQUIRED and/or PKG_PROVIDES files into the CWD, prepend 'new.' to the name. This makes the treatment of these files consistent with what happens with new.slack-desc and new.doinst.sh. Added lines to (03-make_dirs) which cleans these up as stale when starting a new build. As with new.slack-desc or new.doinst.sh files, renaming them without out the 'new.' prepended makes them be used without question and keeps them from being clobbered by successive builds. - (DEFINES) and (06-configure_source) changed the name of CONFIRM_BUILD to CONFIRM_CONFIGURATION. I really find this pause after a successful operation to be unnecessary. A user contributed the idea for this a long time ago, but I have always disliked it as being useless. A more useful point to pause for interactivity would be when checking for install rule and or DESTDIR support. Nobody is likely to not want to continue the build when confiuration has succeeded. Another idea would be to have interactivity if configuration *failed* and give the user a chance to change the configure options and try again. This would be pretty tricky to implement, though. For now, I've done this: comment out the line in DEFINES which sets CONFIRM_CONFIGURATION="YES" when the '-Q' option (interactive mode is used. If anyone really likes this interruption after successful configuration, it can be activated separately by putting CONFIRM_CONFIGURATION="YES" in the src2pkg.conf file. - (11-create_docs) When installing *.desktop files, check to see if the program is a window manager and if so, install the desktop file in etc/X11/dm/Sessions instead of under usr/share/applications. This is only done for any desktop file which matches the package NAME or ORIG_NAME. Any other desktop files will go ti usr/share/applications. Checking if the program is a WM is done by looking in the package for an xinitrc file, so the installation of xintrc files was moved to be done before this routine. - (11-create_docs) Install $NAME.png or $ORIG_NAME.png images to datadir/icons/48x48/apps and install $NAME.svg or $ORIG_NAME.svg images to datadir/icons/scalable/apps. $NAME.xpm or $ORIG_NAME.xpm images are still installed to datadir/pixmaps - (12-compress_man_pages) fix path correction for man-pages - (11-create_docs) Look for html, htm or txt files with the NAME or ORIG_NAME in the normal SEARCH_PATH before reporting if no docs are found in the sources. - (06-configure_source) Add RAW_SOURCE_NAME.spec and RAW_SOURCE_NAME.spec.in to list of spec files to search for. - (07-compile_source) Added a missing mkdir to routine which creates a README when converting a binary package and no docs are present. - (06-configure_source) Added a generic routine to run an alternate CONFIG_COMMAND. This is placed after all other searched routines and is only used if no other configuration methods were found and CONFIG_COMMAND is specified (See daemon-0.6.3 for an example) This may need to be worked into a spot earlier in the configure_source function to work with more such cases. - (06-configure_source) Improved routine for correcting hard-coded paths in Makefiles, added rules.mk and macros.mk to the search list and search the whole sources instead of just the top dir. - (09-fix_pkg_perms) fix grep filtering for setting perms of static *.a libs - Changed all places where FAILED gets set, so that the error message reports FUNCNAME (the bash function name) where the error occurred. - (usr/bin/tracklist) Added an -e or --excludes option to exclude directory paths from the list of created files, links and directories. Also, the parser was changed to use a more conventional syntax where options which require an argument use a single word argument for the long form or two words for the short form: '-o /path' or '--output=/path' - (06-configure_source) Added a general routine which removes stale autoconf files if they are present and fixes permissions for other autoconf files if present. - (11-create_docs) Fixed routine which searches for image files - (12-compress_man_pages) Added an even more generic routine to search for man-pages in the SRC_DIR if none have been found otherwise. This routine uses 'find' and instead of looking for files which match the $NAME variable, it looks for all files which match a man-page suffix (like '.1', '.8', etc). the files are checked using 'file' and grep to see if they are 'troff' files. - (14-make_doinst) Added a routine which will create a *.desktop file for the package if one is not present. Without an interactive routine thee can only be created in a pretty basic form. But one can always edit the basic file and rebuild the package. This routine first checks to see if the package already contains a desktop file. If not, then it checks to see if the package contains a '.png' or '.svg' icon file. If so, then it checks to see if the program *should* have a desktop file. It does this by figuring out if the file depends on libX11. If so, then the desktop file will be written. The routine also detects whether the program is a Window Manager. If so, the desktop file is written a little differently and gets installed to /etc/X11/dm/Xsessions instead of being installed to /usr/share/applications. Newly created desktop files are copied to the CWD as new.$ORIG_NAME.desktop so they can be edited and the name changed for permanent use -just like with other new.* files generated by src2pkg. A line was added to (03-make_dirs) and also in (16-post_process) to remove stale new.*desktop files. The routines for handling slack-provides and slack-required had to be moved to the top of make_doinst so they are done before this routine. This routine is still experimental so it is disabled by default. In order to activate this routine put AUTO_DESKTOP=YES in your srcpkg.conf file. - (06-configure_source) Add 'config.mk' to list of Makefiles which get automatically corrected. - (11-create_doc) Always add CWD/NAME.htmlhtm|txt or CWD/ORIG_NAME.html|htm|txt to docs (tentative) - (13-make_description) Added more ways to retrieve License information from *.spec or debian/copyright files. Also added routine to check for the license in the DOC_DIR/common-licenses if the license is installed there. - (06-configure_source) Added a method for installing tcl script programs - (11-create_docs) Removed -maxdepth limiter from find command when looking for *.pc files - (01-pre_process) Suppressed a couple of lines which allowed name-parsing to be by-passed if NAME and VERSION were both already declared. The old code allowed the user to override the NAME or VERSION derived from parsing by simply using the 'normal' variables NAME or VERSION, instead of having to use ALT_NAME or ALT_VERSION. But, we really need the ORIG_NAME at several other places in src2pkg, so the change (made in 1.9.7) was reverted. This will break a few of mine scripts, but is unlikely to affect other users. (FNUCTIONS) Added code to write_src2pkg_script which prints comments after NAME and VERSION to instruct the user to use ALT_NAME or ALT_VERSION to override the guessed values. - (14A-last_minute_details) Moved code here from (11-create_docs) which creates an archive of package documents (when requested). This needed to be moved so that it happens after detection of LICENSE type in (13-make_description). This also allows the included src2pkg script to be included in the docs archive. The archive creation was fixed to set all documents in the archive to owner=root, group=root after (still another) check to make sure all files are chmodded 644. - (11-create_docs) License-linking routine rewritten to use included versions of common-licenses instead of moving licenses included in the package. This is because some packages include edited versions of the GPL or other license. Copies of the most common free-software licenses are now included in the src2pkg package. We place them in /usr/share/src2pkg/common-licenses so we know where they are. - (14-make_doinst) Show a nicer list of library dependencies when SHOW_DEPS is used - Now for a bit of fun! src2pkg can now give audio notification when the building of a package has finished successfully, has failed or has been cancelled. Three modes are available: BEEP, PLAY and SAY. The BEEP mode uses the 'beep' terminal character to make a sound in the PC speaker. PLAY mode will play a recorded sound. SAY mode will speak a text message. The recorded sounds used can be changed if you like and several are provided for you to try out. Four sound eventy are recognized: success, failure, cancel and ouch. The first three should be obvious. 'ouch' is played only when the user cancels the package build at a 'dangerous' point during the build -like during backup or restoration of any overwritten files when using REAL or SAFE mode. You'll need flite installed for SAY mode to work -I'll work on support for other text-to-speech engines later. - (01-pre_process) Changed a couple of name-parsing routines. - (13-make_description) cleaned up syntax in make_default_desc - (DEFINES) Make LOG_COMMANDS=YES the default - (06-configure_source) Improved parsing of debian rules covers more syntax - (11-create_docs) Add HINTS to searched doument list - (14A-last_minute_details) Added a check for $HOME directory in the package. Some Makefiles wrongly try to create files and/or directories in your HOME dir. This check warns the user and suggests fixing it. - (11-create_docs) Change path to all-locales.txt. The locales list has been moved to /usr/share/src2pkg - updated ChangeLog, man-pages and CHANGES BUILD src2pkg-1.9.8-noarch-1 (19 Feb 2009) - (14A-last_minute_details) Added a check for hidden files or directories in package content with a Notice if found - (FUNCTIONS) Changed format of generated src2pkg scripts in write_src2pkg_script to leave out some commented lines and include more useful option examples - (14-make_doinst) in create_desktop_file, leave out the 'Encoding' key as it is deprecated. Improve prompting about adding Categories entries. This code should probably include an interactive routine for adding Categories. - BUILD src2pkg-1.9.8-noarch-2 (22 Feb 2009) - (01-pre_process) Add PKGNAM=$NAME for more compatibility with code pasted from SlackBuild scripts. - (08-fake_install) Added a routine to post_fake_install which corrects the location of some X11 files and dirs. Especially, this avoids that a doinst.sh is created just to link /usr/X11R6/lib/X11/app-defaults to /etc/X11/app-defaults. It also moves binaries installed to /usr/X11R6/bin into /usr/bin and also moves man-pages into the MAN_DIR. This should leave only include files, libs or shared data under /usr/X11R6. They can't be moved because the paths are set at compile-time. This routine is not useful for modern installations of X which are using prefix=/usr, but is nice for correcting paths on older systems. This whole routine is enclosed in a conditional check for CORRECT_USRX11R6 so it can be turned off if desired. Added the default behaviour of performing corrections to DEFINES. - (09-fix_pkg_perms) Added a routine to 'chmod 644' files under /etc/X11/app-defaults - (13-make_description) Added a routine to validate installed desktop files and correct them if possible. Moved desktop_create function from 14-make_doinst near this routine so that all operations for creating or validating desktop files are together. - (09-fix_pkg_perms) Use a more efficient approach to find files which need to be processed. Instead of running 'find' multiple times, we now run it once at the top of fix_pkg_perms and create several file lists from the ouput. Lists are created of the ELF-bins, ELF-libs, static-libs and libtool files. These file lists are used for carrying out the chown/chmod operations. They are also used later in (10-strip_bins) to avoid having to run find even more times. find is great, but it becomes really slow when the package contains many files. Running it once saves a *lot* of time. - (01-pre_process) Fixed a bug in check_write_permissions where a permission denied error would show when trying to 'touch' a test file. The problem only showed up when SRC_BUILDS_DIR, PKG_BUILDS_DIR or PKG_DEST_DIR hadn't already been created before running src2pkg. Using the src2pkg default settings the problem would never be seen, but if a user specified a new or different location for these directories, src2pkg would show the error. Thanks to Pieter Sartain for finding this bug. - (11-create_docs) Add '-print -quit' to find options when searching for icons/pixmaps to avoid copying the same file multiple times. - (14A-last_minute_details) replace two find commands with one in handle_empty_files - (01-pre_process) Re-wrote the main name-parsing routine. The new code is written in pure 'bash' so it is faster than the former code which called long pipes using echo|rev|cut|grep|rev or similar constructs. The new code is also more accurate and handles more types of names than before and looks a lot cleaner. I did myself the favor of leaving the comments in which show an example name which is handled by each step of the routine. - (01-pre_process), (04-unpack_source) and (src2pkg) Added support for zip archives. This should have been in a long time ago, but zip archives are rarely used for sources. - (06-configure_source) Added a switch which allows you to force running autoreconf or an autogen.sh script. Enable these features with AUTORECONF=YES or AUTOGEN=YES - (06-configure_source) Enabled (again) the exporting of CXXFLAGS but with the ability to disable exporting them by setting NO_CXX_FLAGS=YES. You'd think it would do no harm to always export CXXFLAGS, but when I first wrote in lines which do this, I happened to be testing at least one program which would not successfully compile if both CFLAGS and CXXFLAGS were exported. We'll try this and see if there are other programs break if they are both set. The trouble is there is no way to reliably detect if a build is going to be done with gcc or g++, so we can't simply check and then set the right one. Strangely, many programs that use only the C language compile their 'conftest' program using g++ -it was one of these which was breaking before. - (06-configure_source) Added the ability to include 'build', 'host' and 'target' settings in the options passed to configure scripts. Using this feature involves three variables and two 'switches'. These have been added to the src2pkg.conf file, although they would more likely be used as part of an exported environment for using src2pkg to cross-compile software for another machine. The three variables are BUILD_OS, HOST_OS and TARGET_OS. Unless set explicitly, they are all set to the same value as the output from the 'gcc -dumpmachine' command, that is the 'target' OS of the main gcc compiler- For a normal Slackware installation all three would be set to 'i486-slackware-linux'. There are two switches to activate the inclusion of these values. Setting ADD_HOST=YES causes the HOST_OS string to be appended to the options passed to the configure script. This is just what most normal SlackBuild scripts do. Setting ADD_EXPLICIT_HOST=YES means that each of the variables gets passed to the configure options, where applicable, in the format of individual options like this: --build=$BUILD_OS --host=$HOST_OS. Even though this is the normal usage in SlackBuild scripts, passing these variables is usually only necessary when cross-compiling. Otherwise, the options don't usually have any effect on the program being compiled. There are some exceptions to this. for instance, when compiling bash, the Xorg server, a browser or an email client, the HOST_OS information is compiled into the program and is displayed by the program under certain circumstances. Even in these cases, the information is optional. This is why the options have never been used by src2pkg. They have been added now to nake cross-compiling with src2pkg easier. Still, these variables and their values are kept separate from the other options to configure and are not written into the build scripts which src2pkg generates. This is done so that the same script can be use for another architecture without having to edit the script and change these values. - BUILD src2pkg-1.9.8-noarch-3 - (08-fake_install) Added support for install_root as a DESTDIR variant. This is used by a few sources and particularly by glibc. Having support for this may save any poor soul who might try building glibc using src2pkg! Reworked the routine which searches for DESTDIR or similar support. Instead of searching through an arbitrary list of files which might possibly included by the maein MAKEFILE, the routine now finds and follows any include statements in the MAKEFILE, searching for any of the DESTDIR variants in all of the included files. This should be much more accurate now. Most of the code is in a new function named find_makefile_includes - (06-configure_source) refine the perl and python configuration routines. Added support for qmake. python is now called using '/usr/bin/env python'. - QT-4 was the last straw! Yesterday I waited 10 hours for qt4 to compile -or get close to finishing, that is. I wasn't about to restart the whole build to fix a small error that occurred when it was clsoe to finishing. So I used a couple of tricks to make src2pkg 'resume' the build instead of staring from the beginning. This has always been possible by simply commenting out most of the early instructions in a src2pkg script. But, today I went ahead and wrote in support for a formal method of resuming a build, starting at any of the named instructions from the list of 16 build steps. While I was at it, I added support for being able to pause the build at the beginning or end of each step. I won't be recommending that users do this as a normal practice, but this feature has been requested before and with a little caution it can be very useful. The reason I never implemented this before is because it might lead to laziness on the part of the user, or better said, it could be used to completing a build which is not really repeatable. What I mean is, that if the build is failing at a certain point and the user does something manually and then restarts the build, the build might not be repeatable the next time unless the same manual changes are made in mid-build. This is not the intended use of this feature. Rather, it is meant to be used in cases where the compile takes so long that the user needs, for some reason, to stop the build and then restart it later. The same goes for being able to pause the build at each step -this is not meant to encourage making changes manually while the build is paused. Rather, it is meant as a way to help debug a difficult build, allowing you to examine the content of the sources or package tree before or after each step. Implementing the resume and pause features required placing most of the code for each main function into an extra 'if' statement so it required changes to most of files which hold the functions as well as adding the command-line options to src2pkg and trackinstall. - (08-fake_install) Added a check for the 'install ... root' command to the routine which checks the output of 'make -n install' for chown commands if the user is not root. Since thse commands will fail, the user is warned but the build still doesn't abort. A similar check was added near the beginning of (01-pre_process), except it greps for these commands in the running $NAME.src2pkg script -if one is being used. It might be just as well to abort the build when these commands are found. Not doing so might lead to incomplete or incorrect packages. But, the build might include a doinst.sh script which makes these changes when the package is installed. I'd have to write code which checks each error against the doinst.sh to see if it is okay. For now, let the warning be enough -the user will also get a second warning when the actual command fail. Worked this out while test- building proftpd. This example shows how it is not possible to build any and all packages while running as a non-root user. Although this one could be worked around fairly easily, there are still lots of cases where it would be very difficult to do so. - (06-configure_source) Fixed faulty indication of CONFIG_SUBDIR when the 'funny' subdir is more than one level deep from the toplevel of sources. Added options to disable running autoconf and automake. AUTOMAKE=NO prevents the running of automake and aclocal so changes in Makefile.am, acinclude.m4 and configure.in will be ignored. AUTOCONF=NO prevents the running of autoconf and autoheader so changes in acconfig.h and configure.in will be ignored. These options are useful in cases where the config files call for different versions of automake/autoconf than those installed, where trying to regenerate the config files would cause configuration failure. - (06-configure_source) take absolute and relative paths into account when assigning CONFIG_COMMAND - (/usr/bin/src2pkg) Added an un-documented switch (INCREMENT_BUILD) to update (-U) routine. - (14A-last_minute_details) Added a check for redundant prefix directories. Usually this shows up as having the directory PKG_DIR/usr/usr. This problem is caused by 'faulty' use of the DESTDIR variable in Makefiles. Some Makefiles use DESTDIR where normally PREFIX would be used and this confuses our DESTDIR routines. The same sort of problem can occur with installations which use only 'prefix' -there doesn't seem to be a good way to detect these cases beforehand. This check advises the user to re-create the package using INSTALL_TYPE=JAIL (or REAL) to fix the problem. Otherwise, the MAkefiles must be patched to fix this, or the routine must be skipped and manual installation code written into the src2pkg script. - (11-create_docs) Added conditional code which resizes any *.png or *.xpm images which are not size 48x48. This is controlled with the option CORRECT_ICONS, with the default set to YES in (DEFINES). The resizing is done using the ImageMagick 'convert' utility, so it only happens if the 'convert' utility is installed. Images are resized *in* the package, so originals are not resized. - (06-configure_source) When packaging python modules, only reset INSTALL_TYPE to JAIL if it has been set to DESTDIR so that REAL or SAFE methods can also be used. Also add RESTORE_QUIET routine since many python builds are interactive. - (08-fake_install) Add a general RESTORE_QUIET routine which runs after any type of installation. - BUILD src2pkg-1.9.8-noarch-4 - (14A-last_minute_details) Use double quotes for file and directory names to properly handle names with spaces in them. Had to add code to change IFS so that find would work correctly. - (01-pre_process) Add PKG_CONFIG and PKG_CONFIG_PATH variables to get_flags and export them. - (06-configure_source) Instead of exporting CFLAGS and CXXFLAGS, add them as environmental variables to the configure command line. I tried passing LDFLAGS this way also and it usually works. However, while trying to compile the 'taskbar' program any setting of LDFLAGS fails as the sources include the ltdl libraries. Passing LDFLAGS breaks the build. - (13-make_description) Changed the way description lines get counted and output -this routine still had an off-by-one error which would make it output 12-lines desc files when either the License or URL were missong. It still does not work exactly as I'd like... - (01-pre_process) and (06-configure_source) Place EXTRA_FLAGS between OPTIM_FLAGS and TUNE_FLAGS to avoid possible problems with incorrect recognition of targets.(see taskbar/ltdl notes above) - (13-make_description) Add creation of desktop file for packages which use svgalib. - (06-configure_source) fixed blank ouput to configure-help-short.txt - Added a new method for package content creation which uses a chroot environment and either unionfs or unionfs-fuse. The basic code using unionfs-fuse was submitted by Tim Goya. Then we passed a few revisions back and forth to get both methods working. The new method is called simply UNION and a command-line option has been added to the src2pkg program. If requested, a check for unionfs or unionfs-fuse support is done in (08-fake_install). The main functional code is all in a new file (08D-union_root_install). The command-line option was also added to the trackinstall program and info for the option was added to the man-pages. This method of content-creation may be made the default later. You must be root to use this option, so a check has been added at the top of (01-pre_process). You can make UNION the default INSTALL_TYPE by putting this in your src2pkg.conf file: [[ $INSTALL_TYPE ]] || INSTALL_TYPE=UNION - Added support for a configurable LOG_DIR for the logs of 'configure', 'make' and 'make install' The default is $SRC_DIR and gets set in (01-pre_process) unless set to something else. The only other possibilities of setting it in the src2pkg.conf are to use LOG_DIR=$CWD, or to set LOG_DIR to a full path (LOG_DIR=/path/to/dir) -if so, the directory should already exist. - BUILD src2pkg-1.9.8-noarch-5 - Added support for txz package format and tar.xz sources. Changes in src2pkg, trackinstall, 04A-last_minute_details and 15-make_package. - (12-compress_man_pages) search for SRC_DIR/debian/NAME.man - (06-configure_source) Add support for building perl modules which use the Module::Build module. If the sources contain a Build.PL, then try to use that instead of Makefile.PL. No checking is done to see if the user actually has perl-build installed... bad. There is a good reason to use Build.PL instead of Makefile.pl as it allows us to pass useful extra args like:'create_packlist=0' Support for Build.PL files was suggested by building alzabo and its' dependencies: libalzabo, libdevel-stacktrace-perl, libclass-factory-util and others. - (14A-last_minute_details) fixed broken listing and removal of empty files. - (8D-union_root_install) fixed creation of $NAME-make-install.log when using INSTALL_TYPE=UNION Also, the support for LOG_DIR I added above had gotten lost, so I had to re-write that, making it work with UNION as well. Again, default is set in 01-pre_process, and LOG_DIR was added to (06-configure_source), (07-compile_source) and (08A/B/C/D) files. Cleanup routines were added to (03-make_dirs) and (16-post_process) to remove old logs when re-building or when the -W (cleanup) option is specified. (DEFINES) Changed to LOG_COMMANDS=NO as the default. Logging commands overrides the normal QUIET or -VV (verbose) behaviour -in other words, if logging is enabled, then the default QUIET=YES or QUIET=NO (-VV) options will not work. A convenient command-line option '-LOG' is provided if the user occassionally wants to log output without having to mess with the conf file. IF LOG_COMMANDS=YES is used in the conf file, normal verbose output from the '-VV' option will not be shown. - (08-fake_install) Added a routine to post_fake_install which removes empty *.bs files and .packlist files from perl module packages. For the moment this is done arbitrarily, but can be made optional if anybody squeals... - (06-configure_source) Add support for perl make.pl files. (suggested by build of eaglemode-0.75.0) - found an unusual quirk when building readline-5.2 using the UNION option -the dir PKGDIR/usr/lib gets set to mode 700 and not 755. This doesn't happen if built using some other INSTALL_TYPE. This is the first buggy behaviour I've found using UNION, so I have noted it here so it won't get lost. Okay, this only happens when using the unionfs module(for kernel-2.4 at least), and not when using unionfs-fuse. In view of this, I'm making unionfs-fuse the default method to use (set in 08-fake_install) when INSTALL_TYPE=UNION. Even when using UNIONfS_TYPE=unionfs-fuse, some builds will fail -especially builds which use, link with or install libLTLIBRARIES or libLTDL. - Updated to src2pkg-helpers-0.4 src2pkg and sr2pkg-helpers now include the sources for unionfs-fuse. This utility can be used with the -UNION option, but will only be built if the running kernel supports the fuse filesystem and the fuse utilities are installed. - BUILD src2pkg-1.9.8-noarch-6 - (06-configure_source) Dont't arbitrarily reset INSTALL_TYPE to DESTDIR for sources using cmake, as the user may want to use REAL or other INSTALL_TYPE. Instead use this: [[ $INSTALL_TYPE = "JAIL" ]] && INSTALL_TYPE=DESTDIR (08-fake_install) for sources using cmake, if there is a file 'cmake_install.cmake', add it to the list of included files in 'make-file-includes-all'. cmake_install.cmake is not 'included' by the Makefile, instead it is used like this in the install rule: usr/bin/cmake -P cmake_install.cmake Since this file may contain the CMAKE_INSTALL_PREFIX it must be added to the list of files to check for DESTDIR/CMAKE_INSTALL_PREFIX -otherwise, DESTDIR method fails. Thanks to Piete Sartain for reporting this error. - (04-unpack_source) Add missing lines for handling archives compressed with lzma and xz - BUILD src2pkg-1.9.8-noarch-7 - (06-configure_source), (07-compile_source), (08-fake_install), DEFINES & src2pkg.conf Added DEFAULT_CONFIG_COMMAND and DEFAULT_MAKE_COMMAND. This indirect mechanism provides a way to supply a default setting to substitute for 'configure' and 'make' without directly setting CONFIG_COMMAND or MAKE_COMMAND. Setting these directly disables the src2pkg auto-detection routines which are able to 'intelligently' set these up. If a user wants to use 'remake' or 'pmake' or 'linux32 ./configure', they can use these settings to configure the defaults. Also added support for JOBS as a separate variable. JOBS is combined with the MAKE_COMMAND internally. This controls the number of concurrent jobs run by the 'make' program. - Disabled running the various autools when building coreutils for src2pkg-helpers. This speeds up the build and quietens useless errors. - BUILD src2pkg-1.9.8-noarch-8 - fixed path to libfuse.so in src2pkg-helpers.src2pkg and src2pkg.setup Slackware installs libfuse.so to /lib so support that and /usr/lib. - (14-make_doinst.sh) add '-q' option to update-desktop-database commands and fixed redirection - BUILD src2pkg-1.9.8-noarch-9 - (05-fix_source_perms) Changed algorithm for deciding SHOULD_AUTORECONF - (13-make_description) fixed faulty fixed-path reference to $PKG_DIR/usr/share/applications -should be $PKG_DIR/$DESKTOP_DIR - (08-union_root_install) created a local trap_union_int to undo unionfs mounts and mount --bind directories if fake_install is interupted when using INSTALL_YTPE=UNION - (usr/src/src2pkg/src2pkg/src2pkg.setup) Changed: upgradepkg --reinstall ./src2pkg-helpers-$SRC2PKG_HELPERS_VERSION-$ARCH-1.tgz to: upgradepkg --install-new --reinstall ./src2pkg-helpers-$SRC2PKG_HELPERS_VERSION-$ARCH-1.tgz Using --reinstall by itself meant that upgradepkg would not install the package on systems where src2pkg-helpers was being freshly installed (not upgrading). Thanks to 'hitest' (George Nielson) for reporting this problem. - (13-make_description) Added detection of 'MIT/X Consortium License'. Use 'xargs -r ldd ' when checking executables so ldd doesn't get run on scripts. Use PKGINFO as well as PKG-INFO when looking for description. - BUILD src2pkg-1.9.8-noarch-10 - Upgrade to libsentry-0.6.7.6 which includes support for newer glibc versions from 2.8 through 2.10. Thanks to LQ member Daedra for trying out src2pkg on Slackware64 -current which pointed out the problem. Both Slackware and Slackware64 are nearing version 13 and use glibc-2.8, so this problem existed on both versions. - Added a new file to the docs. Configuration-types.txt gives an overview of all the different configuration types or methods which src2pkg handles automatically. - (01-pre_process) Add support for slackware64 Tweaked x86_64 support in get_flags and remove exception for bluewhite64. (DEFINES) Remove settings for jaguar linux. This should make src2pkg completely indifferent as far as distros are concerned. All settings related to distro-specific settings or other unusual usages like for cross-compiling or on multilib systems should be controlled by setting the variables separately, as needed. But, for 'normal' compiling on x86_64 systems, src2pkg should do the Right Thing and add sane --libdir settings to the configure options and LDLFAGS. This will need to be cleaned up more later after I get some more ideas on how to handle multilib setups so that the libdir and LDFLAGS can be easily overridden when needed, but still 'just work' for normal use. Ideally, this should all be able to be controlled from a src2pkg.conf file to avoid having arch-specific flags written into a $NAME.src2pkg build except for rare cases. Support should probably be added to get_flags for arm, armel (and probably loongson) also. - Released as src2pkg-1.9.8-noarch-11 Version-1.9.7 19 May 2008 - (13-make_description) added a couple of improvements to this routine which make it look for $NAME-$VERSION.lsm as well as $NAME.lsm in the sources. Since *.lsm files contain a nice short 'blurb' about the package, this gets read into BLURB_1 so that a short description is available for the first line of the slack-desc. Also added support to parse debian control files for slack-desc information when converting binary *.deb archives. The control file is copied earlier into the PKG_DIR, so code was only needed in 13-make_description to make this work. Thanks to LQ member 'sfxpt' for indirectly suggesting this. - (12-compress_man_pages) fixed a bug where doc directories which start with 'man' were being seen as being man directories -this was causing the documents to be compressed. - (11-create_docs) Make sure xintrc.* files are set executable - (06-configure_source) Quieten find output when removing '.deps' - (09-fix_pkg_perms) added code to set perms on shared/relocatable libs, static archives and libtool *.la files - (14-make_doinst) quieten 'cat' error output in doinst.sh - (FUNCTIONS) write SHELL_INSTALL into new src2pkg scripts when -S switch is given. (08-fake_install) set INSTALL_TYPE to JAIL for SHELL_INSTALL as DESTDIR check usually fails. - (14-make _doinst) write rc.d/rc.local entry with '& 2> /dev/null' to avoid init hangups when rc or conf files are faulty. - (06-configure_source) add support for EXTRA_CONFIGS to cmake configuration Thanks to Drew Ames for bringing this up regarding the qgis sources. Also changed the syntax for the CMAKE_INSTALL_PREFIX to CMAKE_INSTALL_PREFIX:PATH - (15-make_package) run ldconfig *after* executing the doinst.sh instead of before when installing a package with REALLY_INSTALL - (06-configure_source) set INSTALL_TYPE to JAIL for python modules as the source Makefiles don't usually support DESTDIR Do the same for perl modules, though it may be less needed. Use 'python ./setup.py build/install' instead of just './setup.py build/install' Otherwise the python environment doesn't get picked correctly. (Probably should use '/usr/bin/env python' to be even more sure). I had already fixed this, but thanks to Piete Sartain for noticing that non-executable setup.py files were not being executed. - (06-configure_source) added use of genconf.sh when found. These scripts do the same as autogen.sh or bootstrap.sh (found example in GraphicsMagick-1.1.8) - (01-pre_process) add a definition for DATA_DIR and (FUNCTIONS) write_script_src2pkg add code which writes pointers on usage of DOC_DIR MAN_DIR and DATA_DIR into src2pkg scripts - added a feature which allows the src2pkg script to be included inside the package. This required moving the AUTO_SCRIPT feature from the end of /usr/bin/src2pkg into 13-make_description. Default settings were added to DEFINES and configuration options were added to src2pkg.conf file. There are lots of varying opinions about whether scripts should be included in the package and, if so, where the proper place is to put them. So everything had to be made configurable. The default behaviour is to not include the scripts in the package. If allowed, the default location would put them in with the docs. If wanted, one can place them elsewhere (like /usr/src/src2pkg/scripts) and if wanted, create a link to the script in the DOC_DIR. - a new directory of examples has been included with the docs. The new examples show how to easily package a linux kernel and/or modules together or separately. A fairly detailed HOWTO is alos included. These scripts make it possible to build and package kernel & modules while logged in as a normal user. This required a little creativity with the use of INSTALL_MOD_PATH & 'make _modinst_' instead of 'make modules_install' so that new modules are installed directly into the PKG_DIR. Then using '/sbin/depmod -b $PKG_DIR $VERSION' creates the map files directly in the PKG_DIR. This makes kernel and module packaging vastly easier than using the official SlackBuild scripts. The examples also demonstrate a way to name the new packages so that any old kernels or modules don't get overwritten by the new packages. I had meant to work on this before, but thanks to Raul Castillo for the suggestion which made me finally really do it. - Sept 9 2008 -This is not really related to src2pkg, but Hey, I'm proud! I've recently had a couple of patches included in the official linux-2.4 kernel tree starting with 2.4.37-rc1. The 2.4 kernel is still being actively developed -especially with an eye towards embedded systems. One of the patches I submitted adds the 'rootdelay' boot option which I backported from the 2.6 series. The other patch fixes a file-ownership bug in the UDF filesystem driver. Forgive the digression, but it's not every day you get your name in the kernel ChangeLog... - added an extra prompt when src2pkg is invoked with no arguments. If the src2pkg-helpers are not installed, the user is notified that 'src2pkg --setup' must be run. - The src2pkg-helpers source archive has been updated to src2pkg-helpers.0.2.tar.bz2 This does not require updating the src2pkg-helpers binary packages since the new changes only remove extra files from the sources to reduce the archive size. This makes the src2pkg-helpers archive and src2pkg package about 3MB smaller. Created a src2pkg-helpers-sources.build script and ChangeLog for better repeatability and to document the changes made to the archive. - created smaller sizes of src2pkg icons for inclusion in package - changed the src2pkg doinst.sh script to not show the prompt about running 'src2pkg --setup' if the system already has src2pkg-helpers installed. - updated the manpages, HOWTO and CHANGES files to reflect the current status - Sep 10 2008 - src2pkg-1.9.7-noarch-1.tgz sent out a couple of copies of this to interested parties and found a problem with the src2pkg build script which I had to correct. I had updated the src2pkg-helpers archive but forgot to update the build scripts to the new version. - build script for the src2pkg package now puts a copy of the default src2pkg.conf.new file in with the src2pkg documents - added another sub-directory to the examples directory. The RepoBuild example shows the true power of src2pkg when needing to handle many archives with a minimum of effort. - closed a potential security hole in FUNCTIONS where if a normal user specified a different GLOBAL_CONF file it would be allowed. Since the normal GLOBAL_CONF file /etc/src2pkg/src2pkg.conf is supposed to override any unwanted options that a user might specify, this loophole would have allowed a user to have the 'last word'. I'm not aware of anyone having actually used the feature which allows a user to have their own conf file in $HOME/.src2pkg.conf, but the normal system conf file in /etc/src2pkg is supposed to override any unwanted or 'dangerous' options asked for by a user from the command line or in their personal conf file. - changes to 'tracklist': * add the PATH to the src2pkg bins in /usr/libexec/src2pkg/bin * add tracking of link, ln, chown, chmod, rm, rmdir, mv * added INSTW_EXCLUDE routine to ignore /dev,/proc,/tmp,/var/tmp * export INSTW_TRANSL=0 to make sure that fstrans is off * added command-line options to show usage and version * added command-line options to set debug level and silence output of commands - changed all references to $TAR_STATIC to simply $TAR and changed the comments in /usr/bin/src2pkg referring to tar-1.13 and the other bins used by src2pkg. Since long ago, these are no longer statically compiled, so the comments were confusing. - (11-create_docs) added CWD CWD/Resources CWD/patches and CWD/NAME-patches to search path for *.pc files - reworked handling of automatic correction routines to allow all installed files to be placed under the given prefix. This required making changes in several places in (01-pre_process), (11-create_docs) and (12-compress_man_pages) as well as a new entry in the DEFINES file for the FHS_POLICY variable. FHS_POLICY defaults to "SLACK", which gives the same behaviour as the default before. FHS_POLICY can be set to "LSB" to have src2pkg respect the lsb-compliant (Linux Standards Board) locations for docs, man-pages and info-pages. That is, docs go under /usr/share/doc, man-pages go under /usr/share/man and info-pages go under /usr/share/info. A third setting of "NONE" is available for FHS_POLICY, which allows for really lenient installations. No corrections are attempted to the docs, mans or info pages. It also allows for packages with sysconf files installed under the PRE_FIX. When using FHS_POLICY=NONE, all files in the package should wind up under the given prefix, including shared files and conf files. Since this required many changes in several spots, there may still be glitches in the routines. This change is due to a request by LQ member 'harryhaller' who wants to allow normal users to install packages under their HOME directory. I'm still working on a few routines which have to do with usage of src2pkg by normal users making non-standard packages. These new options are not for general use and should not affect the creation of 'normal' packages while logged in as an unprivileged (non-root) user. - while doing the above, I added a few extra search paths for docs and man-pages. - expanded the list of named variables which can be used for shortening scripts. Now, in addition to DOC_DIR, MAN_DIR and INFO_DIR, you can also use BIN_DIR, SBIN_DIR, DATA_DIR and others. Most of these will hardly ever be needed by most users. See the list of these dirs in (01-pre_process) in the set_system_dirs function. - added a mechanism for authorizing users and the use of personal ~/.src2pkg.conf files * AUTHORIZE_USERS=YES allows a sysadmin to block users from using src2pkg. To allow normal users to use src2pkg, a group named 'src2pkg' must be created. Only users who are a member of the group will be llowed to run src2pkg. This option is set to AUTHORIZE_USERS=NO by default, since most users of src2pkg will not want or need the authorization feature. * A milder form of authorization can be achieved with the AUTHORIZE_USER_CONF option. AUTHORIZE_USER_CONF=YES will only allow users who are in the src2pkg group to use a personal .src2pkg.conf file in their HOME directory. Code for this is found at the top of FUNCTIONS. By default, both the above features are disabled, so most users of src2pkg will not need to do anything special to use src2pkg just as before. But, there are a few folks running multi-user systems with src2pkg installed on them. These authorization routines make it possible to control the usage of src2pkg to some degree. Added the default setting to DEFINES and a commented entry to the global src2pkg.conf file. Using either of these options requires the root user to create a new group called 'src2pkg' and add any users who will be allowed to use src2pkg and/or personal conf files to the src2pkg group. Authorization is not done for the root user (EUID=0). - (13-make_description) added CWD, CWD/Resources, CWD/patches and CWD/NAME-patches to search path for rpm spec files. - (11-create_docs) if a file named $NAME.html is found in the current directory, include it in the docs. Same if one is found in CWD/Resources, CWD/patches or CWD/$NAME-patches. - (/usr/bin/src2pkg) add prompts which show the guessed name and version when running 'src2pkg -N -Q filename' and give the user a chance to change them. - (04-unpack_source) quietened a nagging false error message when unpacking rpm archives using the src2pkg-dnd wrapper. - (14-make_doinst) added NAME-patches, patches and Resources to the search path for pre-existing doinst.sh files. Also, NAME-doinst.sh and NAME-doinst.sh.gz are accepted. - (06-configure_source) changed cmake's DCMAKE_INSTALL_PREFIX to DCMAKE_INSTALL_PREFIX:PATH Thanks to Drew Ames for finding and researching this different syntax. Apparently cmake works with either syntax, but some newer sources which use cmake will only work with the :PATH element in there. - (04-unpack_source) fixed a non-critical error when moving hidden files or dirs in SRC_DIR. - (10-strip_bins) fixed COMPRESS_BINS routine to work with upx or upx-ucl and to check to make sure one of them is available - (13-make_description) add 'linux-gate' to the list of files to exclude from requires listings. 'Requires' routines reworked so they function even when a slack-desc is present. Package dependency version number is retained if INCLUDE_DEP_VERSIONS=YES . - (13-make_description) improved parsing of dependency info -special cases for gcc_so - moved do_last_minute_details and dependency generation into 14-make_doinst from 13-make_description. Dropped the option to add required info in PKG_DESC file. - (01-pre_process) & (16-post_process) make DONT_CLOBBER respect any pre-existing script - (FUNCTIONS) check exit staus after sourcing personal and GLOBAL conf files. Exit if an error condition is returned. This required changing the syntax in src2pkg.conf from this style: '! [[ $VAR ]] && VAR=VALUE' to this: '[[ $VAR ]] || VAR=VALUE' - (01-pre_process), (15-make_package), (DEFINES) Add PKG_FORMAT variable. This allows you to create packages using bzip2 or lzma as the compressor. These packages are not compatible with the standard Slackware pkgtools, but can be used with the tukkani pkgtools or others which support tbz or tlz packages. This was also added as a command-line option to /usr/bin/src2pkg (-GZ, -BZ or -LZ). Also added this command-line option to the trackinstall program. Updated the manpages to show the new options. - Added an EXTENDED_DATABASE option. This includes two separate options: ADD_REQUIRED_FILE and ADD_PROVIDES_FILE. They can be used separately or setting EXTENDED_DATABASE="YES" enables both options. The ADD_REQUIRED_FILE option was already present and is the most useful of the two. It adds a 'slack-required' file to the package which makes the package more suitable for use with slapt-get and other package managers which support the use of these files. The ADD_PROVIDES_FILE adds a file to the package which lists all libraries and links to them which are installed by the package. This is not supported by standard Slackware pkgtools, but won't cause any problems with them either. ADD_DEPENDS_IN_DESC option was removed. The ADD_REQUIRED_FILE option has been greatly improved and adding the info to the desc file was not such a great idea. The routine lists all dependencies separately(commented) for best detail, and then the packages which contain the required libs are listed for compatibility with slapt-get. There are two options which let you control the output: INCLUDE_DEP_VERSIONS="YES" will make this routine list the complete package versions and INCLUDE_BASE_LIBS="NO" causes the routine to ignore the glibc and aaa_elflibs packages when listing the dependencies. - made md5sum generation print relative path to the package - (usr/bin/src2pkg) Added menu item '-hh' or --more-help to show extended options and examples in a separate page. In addition to the examples, the options for several features are shown here, which can be used to create 'non-standard' packages. The new options are: -E Use extended database -that is create slack-required and slack-provides files -L Delete extra language, locale, i18n and man-pages -BZ Use bzip2 to compress packages instead of gzip -LZ Use lzma to compress packages instead of gzip. These two options create packages which are incompatible with standard Slackware pkgtools. They can be used with the tukaani pkgtools or with other package management tools (like my pkg-tools) -Z[1,2,3,4] The Z options use compression to internally reduce the installed size of a package. The Z options are cumulative, that is, Z2 does what Z1 does plus more -Z4 does all of Z1, Z2, and Z3. -Z1 Uses bzip2 to compress man-pages -Z2 Creates a tarred-bzipped archive of the package documents -Z3 compresses the binaries using upx or upx-ucl -Z4 Links the 'COPYING' file to a common license file. - (usr/bin/src2pkg) & (usr/bin/trackinstall) Added -UPX command-line switch for COPMRESS_BINS="YES" - updated man-pages to reflect the above changes - (12-compress_man_pages) Added routine to remove info pages when SAVE_SPACE=4 - (11-create_docs) Removed the INSTALL file from the list of standard documents to search for. INSTALL files usually deal with installation from source and may lead to confusion on the part of users who read them as part of an installed package. - (06-configure_source) - Fixed prompt output when showing CONFIG_COMMAND. It was using 'basename $CONFIG_COMMAND' which would incorrectly show the command when it was something like './configure Linux' by cutting off the 'Linux' part. The real command was working correctly -just the output was not showing correctly. - moved binary compression routine from (10-strip_bins) to the do_last_minute_details section in (14-make_doinst). Added an option to specify the BIN_COMPRESSOR in the src2pkg.conf file. Otherwise, the path is searched for upx-ucl or upx. We prefer upx-ucl beacuse it is an opensource solution even though the compression ratio is slightly lower than that of upx. - (11-create_docs) fixed routine which searches for pkgconfig '*.pc' files so that files found are validated to make sure they really are pkgconfig files. A couple of programs (like cpio) contain a 'makefile.pc' or 'INSTALL.pc' file which would fool our simple routine. I've meant to fix this for a long time but kept forgetting about it. - updated libsentry to version 0.6.7.5. Felipe Sanchez, the installwatch maintainer has resumed working on installwatch and checkinstall. He incorporated my openat, fchmodat and fchownat features and other changes from libsentry into installwatch. He then added __fstatat and __fstatat64 which were lacking to make fchownat work properly. So, these extra functions have been back-ported from installwatch into libsentry. I have not tested these new functions yet, but their addition should make it possible to leave out the mini-coreutils from src2pkg. For the time being, I will leave them in, though, as they are dependable and their behaviour is predictable. src2pkg-helpers was updated with the new libs and version bumped to 0.3. - More fixes to handling of FHS_POLICY so that LSB works correctly. - (06-configure_source) fixed handling of perl modules so that MAKE_COMMAND can be set or EXTRA_CONFIGS can be used to pass arguments to the perl Makefile.PL routines. Thanks to linuxquestion.org member rpedrica for pointing out this need. - update build to src2pkg-1.9.7-6 - (05-fix_source_perms) leave Makefile.in out of list when detecting need for AUTORECONF Running autoreconf should only be necessary when *.am files or configure.in are changed. - (11-create_docs) further fixes to handling of pkgconfig *.pc files update build to src2pkg-1.9.7-7 - The doinst.sh script for src2pkg now compares the src2pkg-helpers version and prompts the user to update src2pkg-helpers only if needed. - (13-make_description) quieten false errors when catting SPECFILE -these errors only show up when using src2pkg-dnd - (06-configure_source) Re-enabled correction of PREFIX for multiple Makefiles - (13-make_description) fixed handling of BLURB_11 (SIGNATURE). this was being left out when slack-desc was generated from spec, control, lsm or other such files. - Fixed lingering issues with moving/removal of incorrect doc, man and info dirs in (11-create_docs) and (12-compress_man_pages) - (14-make_doinst) Fixed INCLUDE_BASE_LIBS to work correctly and to exclude the gcc-* packages from any dependency listing. Changed (DEFINES] file to use INCLUDE_BASE_LIBS=NO as default. - (06-configure_source ) remove '-n' option from perl modules configuration as it doesn't always work. The perl routine has been changes to allow use of EXTRA_CONFIGS to pass options to this routine, or the user can specify the whole MAKE_COMMAND to do the same thing. - (14-make_doinst) optimized gen_provides_list by a factor of 8! python with its 3500+ files was taking forever to run this routine, which made me take notice of a really slow block of code. - (07-compile_source) If MAKE_COMMAND has been specified, allow 'make' routine to run even if no Makefile was found. This allows for special routines which use no Makefile (or similar). - (12-compress_man_pages) - use 'find .. -exec' instead of 'find |xargs' everywhere why call another external to do this? Do not chmod 755 any links as this changes the perms of the target of the link if the link is valid. Add a small routine which examines all links and re-writes them to match the chosen compression method/extension - (06-configure_source) changed the routine which seraches for configure script options in available PRM *.spec or debian/rules files. This is separated from the AUTO_SCRIPT option now. Using options found in these files is not always a good idea and also src2pkg can not always successfully parse the information since the syntax is not consistent between different versions of rpm and/or debian compat versions. This means that sometimes what gets parsed out contains garbage which causes configuration to fail. Plus, many users who might otherwise like what AUTO_SCRIPT does, might not want to use this option. At the same time, the alternate method of finding possible standard options has been improved. The new feature is enabled with the option AUTO_CONFIG. If AUTO_CONFIG is set to FOREIGN then the above routine is used -searching inside rpm *.spec files or debain/rules files if they are found in the sources. If AUTO_CONFIG is set to NATIVE, then src2pkg parses the configure script and adds some useful standard options if they are found there and are in the user configurable list of AUTO_CONFIG_OPTIONS. AUTO_CONFIG_OPTIONS is set by default to "sysconfdir localstatedir", but any of the similar, normal autoconf options can be set in the list. The src2pkg.conf file contains the full list of supported options. What this means is, that if NATIVE is set and there is a configure script, the script is grepped to see if any of the options in AUTO_CONFIG_OPTIONS is present in the script. If so, then they are added with their default values into the configure options for the current package. Only the most common and least intrusive defaults are set. The default values for the options like 'mandir', 'libdir', etc are set in 01-pre_process according to the users' FHS_POLICY setting. The defaults for AUTO_CONFIG and AUTO_CONFIG_OPTIONS are in the DEFINES file and can be be overridden in src2pkg.conf. The command-line options -ACF for AUTO_CONFIG=FOREIGN and -ACN for AUTO_CONFIG=NATIVE have been added to the src2pkg command-line program. - Changed temporary build location for src2pkg-helpers as used by src2pkg.setup when running 'src2pkg --setup'. The old location was a safe directory in /tmp, but this was causing problems for users who have /tmp mounted on tmpfs. The location was changed to use a proprietary location in /usr/src/src2pkg/builds. This directory is removed when the build of src2pkg-helpers is finished. - Updated the src2pkg man-page to reflect these changes. Update the CHANGES file. Update build to src2pkg-1.9.7-noarch-9 - add export LC_ALL=C to FUNCTIONS. This may speed up sort routines. - (11-create_docs) (src2pkg.conf) add a function to link license files to a common location. Typical license files like COPYING, GPL, etc which are found in the package are examined to see what version of the license it is. Then, the file is moved to a common location and a link is placed in the normal location. This means that instead iof ahvong hundreds of copies of the same license on the system, each package can have a link to the common location. In practice, each package will still contain the file in order to comply fully with the GPL or other license. But since it gets installed into a common location, each package will overwrite any existing copy there.This also keeps the real file from being removed as long as there are any other packages on the system which link to the common file. So, packages won't be any smaller, but several MB's of disk space are saved on the installed partition. Licneses supported are GPL versions 1, 2 and 3, LGPL versions 2, 2.1 and 3, and the Artistic license. The most common of these files range between 16 and 35 KiloBytes. Having a few hundred copies of them on your system can really add up. And our method of actually including them in the package means that any single package still contains the license file. Debian packages depend on the license files being installed separately. Touche'! The licenses are installed into a subdirectory of the normal document directory -/usr/doc/common-licenses on Slackware systems, /usr/share/doc/common-licenses on LSB systems. - (11-create_docs) (DEFINES) (src2pkg.conf) reworked the function which compresses the documents directory to support using gzip, bzip2 or lzma to compress them instead of just bzip2. DOC_COMPRESSOR can be specified in the conf file. Compression is enabled separately using COMPRESS_DOCS instead of SAVE_SPACE. - standardized the search paths for some special files. - Added the ability to run 'user extensions' for each function in the instruction set. If allowed in the src2pkg.conf file, a user can create 'extensions' to any of the normal src2pkg functions which can be run before or after the regular code in the function. Extension files should be located in the directory $HOME/.src2pkg/extensions which must be created manually. Extensions can be created for pre or post-execution for each of the numbered files in /usr/libexec/src2pkg. For instance, to run lines of code before the normal code in 04-unpack_source is run, create a file named $HOME/.src2pkg/extensions/04.pre and place the code there. To add code which should be run after the normal function ends, name the file XX.post. For instance, to run code after 15-make_package has finished, put the code in a file named: $HOME/.src2pkg/extensions/15.post. This feature is off by default (DEFINES) for security reasons, but can be enabled with the option ALLOW_USER_EXTENSIONS=YES in the /etc/src2pkg/src2pkg.conf. This mechanism is a crude way to make it possible for src2pkg users to add their own custom code to src2pkg in an easy and consistent manner. Each of the normal src2pkg functions now has a 'trigger' which looks for extensions at the beginning and end of the function. If an extension is present then the code in it is run before or after the normal commands, depending on the name of the extension. No error checking is performed on these actions at this time, so the user should take great care to test and debug any code they use this way. And, there is no mechanism at this time to enable/disable the use of extension on-the-fly, so any code placed in an extension will always be run. This feature was created mostly for a couple of src2pkg users who are always trying to get src2pkg to do extra things which I don't feel should be a part of the regular src2pkg code. This feature alllows them to have their way. This is also a pretty good way for would-be contributors to the src2pkg code, to develop and test their code. Note that there are four files in /usr/libexec/src2pkg which start with the number '08'. extensions are only run for the main one of these: 08-fake_install. The other files named starting with '08' are subroutines which are conditionally called from the main 08-fake_install, so there is no need or possibility to use separate extensions for the others. - (06-configure_source) Added detection of "--prefix" option. When this option is not present in the configure script it means that the configure script is not of the autoconf type. So, now we don't concatenate --prefix=$PRE_FIX to the CONFIG_ARGS to avoid configuration failing because of unrecognized options. Instead, if not found we turn on interactive mode and give the user a chance to fix this. This situation occurs infrequently, but our default way of always adding --prefix=$PRE_FIX to the CONFIG_ARGS was breaking builds occasionaly. This would happen when the non-standard configure script uses another option syntax like "-prefix=?" or "--prefix-dir=?" - (14-make_doinst) Added optional COMPRESSION_SIZE_LIMIT and BIN_COMPRESOR_OPTIONS to the compress_bins routine. COMPRESSION_SIZE_LIMIT lets you set a minimum size to use when compressing binaries. src2pkg will not attempt to compress files smaller than the value in Kilobytes that COMPRESSION_SIZE_LIMIT is set to. The default setting is 50. upx or upx-ucl can compress files still smaller than that, but files smaller than 50K may even become larger when compressed. I had also added a routine for compressing shared libs, but it turns out to not be possible with any compressor I have found. There is a very kludgy method to do this which I may investigate further, but for now, the compress_libs code is commented out or ignored. After doing all this, I discovered that someone has revived an old project called 'exepak' which is another binary compressor. I worked with this program several years ago. The new version now uses the same UCL compression library as upx-ucl. The compression rates are not as good as upx or upx-ucl, but it is much faster. And, unlike upx and upx-ucl, binaries compressed with exepak will still work on systems which use uClibc. So, exepak is a better choice of compressor for use on embedded systems. The default compressor is upx-ucl since it is open-source, but you can set BIN_COMPRESSOR=upx to use the 'real' (and closed source) upx instead. Or you can set it to 'exepak'. Compression of binaries is pretty safe and can be activated with COMPRESS_BINS=YES in the src2pkg.conf file, but it's a good idea to test compressed programs to be sure. You can also set the compression options to use with upx/upx-ucl to achieve faster or better compression. The possible options include -1 to -9, --best, --brute and --ultra-brute. The default is --brute as it seems to be the fastest way to get the best compression. The --best option can take a long time for larger binaries. If you use the exepak program, the only useful option is '-b#', where # is the block-size in Kilobytes. The default is 256 and 32 seems to be the minimum size. Smaller block sizes should give better compression ratios, while larger block sizes should compress and decompress faster. While it is possible to use UPX on other types of files, src2pkg will only try to compress ELF executables (binary programs). I have not tested exepak on other file types. Default settings were added to (DEFINES) for all these options and they were added to the /etc/scr2pkg.conf file with notes about how to use them. A routine was also included which creates a text file in the DOC_DIR of the package with a notice to the user that the package contains compressed binaries, and notes on how to de-compress them if there are problems running the program(s). Then a full list of the compressed programs is appended to that. Note that, even though exepak doesn't achieve as good compression ratios as upx or upx-ucl overall, it can and will compress programs as small as 5K. upx will refuse to compress programs at that size. - Added a file to the docs which briefly explains most of the extra files which src2pkg can automatically add to the package and those generated by src2pkg as part of the build. This file is called src2pkg-special-files.txt - changed BZ, GZ and LZ options to TBZ, TGZ and TLZ -should make them easier to remember. - (06-configure_source) Fixed an obscure problem reported by A. Griffith. I had seen the same problem before, but had not written a fix for it as it is so rare and I didn't remember which program had caused the problem. The problem is this: Not all configure scripts are equal and some of them do not support the --prefix argument. And, since src2pkg has always treated the --prefix option and arguments separately and provided --prefix arbitrarily, there was no way to leave it out of the CONFIG_ARGS string. So, I took advanatge of having the name of a source which showed this behaviour (openttd-0.6.3) and fixed this problem. Since src2pkg now does auto-detection for the presence of other options like --sysconfdir and --localstatedir, I simply added code that checks to make sure the --prefix syntax is supported. If not, then it is not added by default. It not being there also triggers the showing of the configure options if they are available -the output from './configure help'. This provided another twist with the openttd sources as the configure script itself does not contain the '--help' option. src2pkg used to generate this output by simply running './configure help' and re-directing the output into a text file for further use. But then, I had run across a configure script which did not support the --help option and would hang or crash src2pkg if it was given. So, we started grepping the configure script for the '--help' string before running it. But now, the openttd script doesn't contain the string directly -instead it gets it by sourcing another file. So, I've come up with the solution of running ./configure --help in a separate, backgrounded process so it hopefully won't hang if it fails. Even if it does, it was only one program I found which would do that and now it's two which fail if --prefix is used by default. 2 to 1 is huge majority -by percentages anyway... :-) - (06-configure_source) Fixed a problem reported by LinuxQuestions forum member 'rpedrica' who was having a problem with using double quotes in options to configure. The package in question was 'squid'. Robby was unable to get src2pkg to accept any options to configure which used double quotes like: --enable-storeio="ufs, aufs". This was easy to fix with quotes around $CONFIG_ARGS. Checked it to be sure that it worked consistently from the command-line or as used in src2pkg scripts. I was afraid the double quotes would have to be escaped, but it works simply by using -e='--enable-storeio="ufs, aufs"' from the command-line or with the same quoting in a src2pkg script: EXTRA_CONFIGS='--enable-storeio="ufs, aufs"' - Curses! Curses! And I don't mean ncurses... Now fix the spaces-in-path problem, Gilbert: This fix was an awful nightmare as it meant putting double quotes around every spot in src2pkg where a path gets mentioned. Now, that may not sound so bad, but the src2pkg functions and wrapper sctips are niow over 7,000 lines! And I had to go over every line of that puttin in quotes as needed -sometimes several places per line. Took about 3-4 hours. Now, what that is suppsoed to fix is the failure of src2pkg to work when any of the pathc used have spaces in the names. And the result is I don't recommend that you do this. src2pkg will work just fine, but many sources will not. It depends on which commands are used to install the programs in their Makefile. Some command syntax will not work correctly and it gets messy when they fail -throwing files around where you don't expect them. If you need to build sources which have spaces in the path names it is okay, but if the build directory (SRC_DIR) has spaces in the path name you are likely to have problems. If you really need to build this way, contact me and I'll explain how you can (maybe) work around the problem, but it really is much easier and more reliable to simply change the path names to not contain any spaces -even if only temporarily. I really kind of regret even fixing this as it makes it possible for you to do something risky -well if you are building as a normal user you won't be risking anything outside of your HOME directory. The other thing I don't like is that it destroyed my syntax scheme in the src2pkg code, making it a little harder for me to read it. Oh well... - Go back to using 'umask 022'. This used to cause occasional problems, but by now src2pkg handles nearly file and directory creation scenarios which would make using umask 022 all the way through any trouble. Still gotta add a little more code for detecting any unsual directory or file permissions just before package creation, which will create lines in the doinst to properly set these perms at installation time. These cases are rare -mostly for services which use some directory like /tmp, /var/tmp, /var/run or /var/lock, and we already correct these automatically, but I see a chance to be even more thorough. Can't hurt! - updated man-pages, ChangeLog, CHANGES and also updated Coypright dates throughout. - (08-fake_install) redirect output of 'make -n install' when checking for install rule. We may be able to use the output of this sometime. - more changes to tracklist, adding a -m option which lists operations in metadata format and a -b (--brief) option to list only files and directories created. See the next item for more: - (08A-destdir_install) Added a routine which verifies the DESTDIR (or similar) support. Using the new --brief option of tracklist, installation using DESTDIR is checked to see if any files were created outside of the PKG_DIR. If so, the files are listed and then copied into the package tree. They are not removed from the original location since no backups are done. Backups might be added later. I've wanted to implement this feature for a long time, as it shows when sources have faulty Makefiles. Most people trust DESTDIR more than it deserves -this routine should help by pointing out when DESTDIR is only partially supported by the sources, so people can file bug reports with the developers. An example program which only partially supports DESTDIR is xchat-1.8.9. * Also added support for INSTALLROOT to (08A-destdir_install) - (09-fix_pkg_perms) added a routine which lists any files or directories with 'unusual' ownership or permissions. Any directories which do not have the 'normal' permissions of 755 are reported. Any files which don't have permissions of either 644 or 755 are also reported. The directories tmp, var/tmp, var/run and var/lock are ignored when reporting. Instead, the permissions for these are arbitrarily set as they were before. But, other directories are not arbitrarily reset to 755 as they were before. Reporting these unusual perms and ownerships is informative for the user and may help to resolve possible problems. In the future, this routine may include code which writes lines to the doinst.sh to insure that proper ownerships and permissions are set for some files and directories -like when a daemon or service program uses a private directory (usually under /var). - Most of the above routine was moved to (14-make_doinst) as part of the do_last_minute_details function. This means it is the last thing done before 15-make_package is called. However, new code was added to 09-fix_pkg_perms to correct permissions and ownerships of many more known system directories. In addition to BIND_DIRS, INCLUDE_DIRS, LIB_DIRS, LOCALE_DIRS and MAN_DIRS are checked individually. This is a great improvement over the former behaviour which chmod'ed all directories to 755 except for the few system dirs which use 775 or 1777. I quickly changed what had been done above, because testing quickly showed that lots of packages were being made without the proper perms -luckily I ran into a string of sources with bad behaviour which showed the worst face of the routine. - (14-make_doinst) added code to the deps listing routine which handles unfound dependencies in a better way. Some packages which have been built from source have a dependency on libraries which are part of the same package. These are culled from the depends list. But, if a binary package was being processed by src2pkg (conversion from rpm, deb, etc), then the unmet dependencies will be listed in a file in the CWD. - (14A-last_minute_details) created this new file to separate the several routines which are run just before the actual package creation begins. Some will wonder why I didn't write these routines into the very top of 15-make_package. Instead the do_last_minute_details routine is called as the last thing in 14-make_doinst as this prrovides the user one last chance to insert code between the time when 14-make_doinst finishes and 15-make_package starts. But, putting the code in a separate file makes it easier to read. I could have aded an extra instruction to the list of named, called functions that appear in each src2pkg script, but this would break backwards compatibility. It is not obvious why 'last minute details' should be a part of make_doinst, but it just happens that several code additions have made it necessary or advisable to do several things just before starting actual package creation. Capiche? - BUILD= src2pkg-1.9.7-noarch-12 - added a small man-page for the tracklist utility. This tool is now used internally to verify the use of DESTDIR, but it is quite handy when used alone, as well, especially when you just want to track the creation or mdoifcation of files without making any changes to what happens. It provides a more comfortable frontend to the sentry(installwatch) program since the output log is parsed into a very readable form. - (02-find_source) added support for the aria2c downloader. Also added support for DOWNLOADER_OPTIONS for aria2c and wget. These are set up in DEFINES -the old default options for wget are used as the default if the DOWNLOADER is set to wget. Bur, whereas src2pkg used to check for the first available downloader from the list of wget, rsync, curl or lynx, it now sets the default to wget unless something else has been set. The DOWNLOADER_OPTIONS are only usable with wget or with aria2c -with no defaults set for aria2c at all. The default options for wget are: '--tries=3 --timeout=15 -O' Thanks to Xavian-Anderson MacpHerson for suggesting aria2c and pointing out a typo in the man-pages. Support for downloading using torrents has been added to /usr/bin/src2pkg, but is commented out as it doesn't seem to work as expected. Actually, I'm having trouble finding sources which are available as torrents with which to test this functionality. the fact that very few sources are made available means that this feature would be of limited use anyway. If anyone wants to download sources using torrents, they can simply do it manually -other torrent clients seem to work more dependably than aruía2c anyway, at least at this time. - (13-make_description) DESC_WRAP_LENGTH has been made a configurable variable -also for the nearly duplicate code in FUNCTIONS (make_simple_desc). This allows the user to set the line length for the PKG_DESC (slack-desc) files when they are formatted by src2pkg. I also added a 'fancy' routine which writes the text header using the variable length specified by DESC_WRAP_LENGTH and also made the header text itself into a variable. So if you want to see the original 'famous' line with "handy-ruler" in it, you can do so. We do not write all the other descriptive lines on how to use the 'handy ruler' though. The default text is: "Use this guide to format your text with" The old code was pretty simple and wrote the above text like this |--- TEXT ---| in a line with an arbitrary length. This seemed to be a wonderful spot to substitute one line of code with 15 to calculate the length of the configurable text and subtract that from the configurable DESC_WRAP_LENGTH and use several echo -n statements to compose the line. Ah well, what we do to please our users -also suggested by Xavian-Anderson MacpHerson. - BUILD= src2pkg-1.9.7-noarch-13 - (05-fix_source_perms), DEFINES and src2pkg.conf new code was added to the patch application routines to warn or exit when application of a patch fails. The default is to only warn and gets set in DEFINES. The option EXIT_ON_PATCH_FAILURE was added to the src2pkg.conf file where simply uncommenting the line will cause src2pkg to exit when patching returns a non-zero exit code. The default is to only warn because patch failure may not be fatal and patch might return a non-zero exit status even thought the patch or patch 'chunk' was actually applied. From what I have seen, patch sometimes reports an error when the offset or fuzz is very large and even creates a *.rej file, but it has, in fact applied the chunk. If you dislike this default behaviour, simply uncomment the line in /etc/src2pkg/src2pkg.conf - usr/bin/src2pkg Added an option '-LOG' to log the output from the 'configure', 'make' and 'make install' commands. Code for this is also in (06-configure_source), (07-compile_source) (08-fake-install), (08A-destdir_install), (08B-jail_root_install) and (08C-real_root_install) Updated the man-page for src2pkg with this change. Added an entry for this option in src2pkg.conf - (08-fake_install) Added a check for the presence of the chown command in the $NAME-test-make-install.log This is only done when trying to package as a non-root user. If you try to build a package as a non-root user and the Makefile calls chown or tries to set the owner or group of a file to some other user or group, the build will probably fail. This warning gives a clue to this even before the command is really run, but which may be helpful when/if the installation fails. As stated elsewhere, some packages must be built as root because the 'make install' command sets file or directory ownerships (or group) to something other than 'root' -this is sometimes the case with porgrams which run as daemons or other 'services' which run at startup and have files or directories which belong to them or their group, or to user/group nobody. Since you can only use chown to change the owner/group to groups you belong to, the 'make install' rule will usually fail unless you are logged in as 'root'. - BUILD= src2pkg-1.9.7-noarch-14 - (06-configure_source) fixed use of PRE_FIX with scons (08-fake_install) fixed DESTDIR usgae for scons-based builds. This has probably been broken for awhile, but since I don't run across many builds using scons I hadn't noticed it being broken since a lot of code has been redone in the installation routines. The program which showed the errors was 'ipager-1.1.0', which makes a good test-case. for scons builds since it compiles pretty quickly compared to most scons builds. - DEFINES Added default options for torrent downloads for aria2c. The options must include --seed-time=0 so that the download process terminates and exits. Otherwise src2pkg can't continue with the build. Update: torrents support has been disabled. - (08-real_root_install) Reimplemented automatic backups as an option when using the -REAL option (INSTALL_TYPE=REAL). For a long time src2pkg did this as the only way of creating package content, but when we switched to using DESTDIR, backups were only done if the user used the -B option which would also save a copy of the backups. This code has now been slightly reworked to, once again, provide the ability to have src2pkg back up any files which are about to be overwritten on your system and then restore them before finishing package building. This hsa been added to the src2pkg command-line options as the '-SAFE' option. This option implies the -REAL method of content creation. You can slo use the '-B' option to have src2pkg create and save an archive of the files which were overwritten, but since src2pkg restores the overwritten files, for most users this is not needed unless they want to examine the content of the archive. These changes finally restore the full utility of src2pkg in an easy-to-use way. Most people wrongly trust DESTDIR and I only switched to using that method by default because most people *think* it works fine. But now, src2pkg verifies the accuracy of DESTDIR when it is used and fixes things as well as possible. That is, when 'make DESTDIR=$PKG_DIR install' wrongly installs files outside of the PKG_DIR, src2pkg copies them into the PKG_DIR -but it does not remove the originals from the system as it does not know if they have overwritten files which were already there. To summarize, using INSTALL_TYPE=REAL provides the most accurate way of tracking content creation since both DESTDIR and JAIL will sometimes fail. Using the -SAFE switch provides the added protection of creating backups of any system files which are about to be overwritten and then restores them after copying the new files into the PKG_DIR. You do have to be running src2pkg as 'root' to use this method, but it still achieves the best accuracy and provides the most safety possible while running 'make install'. - BUILD=src2pkg-1.9.7-noarch-15 - (13-make_description) Added support for using description-pak text files for composing PKG_DESC (slack-desc) files. - (05-fix_source_perms) Added support for a common PATCHES_DIR to the auto-patching routine. The default is to look for patches in the CWD, CWD/patches or CWD/$NAME-patches but this new option lety you use a common dir for all patches. Having them all in a single dir means that a patch list cannot be auto-written for you, but if you put the pacthes for a particular package in $PATCHES_DIR/$NAME-patches then they will be correctly found. This option was added to the src2pkg.conf file also. PATCHES_DIR/$NAME-patches is also used in (11-create_docs), (12-compress_man_pages), (13-make_description) and (14-make_doinst) so that functions whihc use SEARCH_PATH can look for docs, pixmaps, man-pages, PKG_DESC files and doinst.sh files there as well. - (06-configure_source) Add $ORIG_NAME.spec and $ORIG_NAME.spec.in to the list of files searched for SPECFILE. Changed the whole search routine to use SEARCH_PATH as in other places. - (12-compress_man_pages) use --force option to compress man-pages with. I have run into several packages (nvi, perl) which install hard-linked man-pages. In these cases, gzip, bzip2 or lzma will refuye to compress them and we wind up with uncompressed man-pages. - (06-configure_source) Added SRC_DIR/build and SRC_DIR/dist to search paths for config files. - (15-make_package) & (14A-last_minute_details) moved the routine which handles empty files empty files in the package from (15-make_package) to (14A-last_minute_details) and made it accept, by default, empty files under /var in addition to /etc. Many packages include empty log files somewhere unde /var or empty conf files under /etc. So these are ignored by this routine. Most other empty files are found with the documents and these are all removed by a routine in (11-create_docs). Usally, any other empty files are garbage and can be discarded. - Changed the name of FORCE_ZERO_LENGTH to ALLOW_EMPTY_FILES, but an alias is setup in DEFINES to maintain backward-compatibility with scripts which contain FORCE_ZERO_LENGTH=YES - (14A-last_minute_details) Added a routine which detects some possibly bad directory locations. For now, the routine is only run when FHS_POLICY=SLACK and checks if the directory /usr/etc or /usr/var exists in the package. If so, the user is notified that --sysconfdir=/etc and/or --localstatedir=/var should be added using the -e'?' option or EXTRA_CONFIGS variable. - (14-make_doinst) Use readlink on filenames when checking dependencies -this should make checking the files more accurate and fast as opposed to parsing out matching dirs and links from the script portion of the package database. This also makes the inclusion of glibc in the depends list work more easily. - (13-make_description) Added a routine which detects the type of license and homepage of the program when possible and adds this info to the PKG_DESC (slack-desc) file. ***** Released as src2pkg-1.9.7-noarch-17.tgz (28 January 2009) Version-1.9.6 11 February 2008 - (11-create_docs and 12-compress_man_pages) check to make sure that $PKG_DIR/usr/share exists before trying to remove it. Not doing so was causing src2pkg to report removing it when it had never existed. - (14-make_doinst) add a routine to detect *.desktop menu files in the package tree. If found, add a routine to the doinst.sh to run update-desktop-database on installation, unless the routine is already present. - (03-make_dirs) clean up new.$PKG_DESC, new.$PKG_REQUIRED and new.doinst.sh if they exist before starting a new build - (DEFINES) add variables PKG_SUGGESTS and PKG_CONFLICTS - (16-post_process) cleanup up new.$PKG_REQUIRED after the build when using the CLEANUP=ALL (-W) option. Removed a left-over reference to FAKEROOTPID - (13-make_description) fixed generation of dependency info which is optionally added to PKG_DESC(slack-desc) and PKG_REQUIRED(slack-required). I hadn't noticed that these were broken. They are disabled by default but can be enabled with these options in the src2pkg.conf file: ADD_DEPENDS_IN_DESC="YES" and/or ADD_REQUIRED_FILE="YES" - (/etc/src2pkg/src2pkg.conf) corrected syntax for the above - (14-make_doinst) moved handling of config() for files in PKG_DIR/etc so that the changes get copied to the new.doinst.sh - (15-make_package) add creation of md5 checksums for packages added variable with a default setting of CREATE_MD5_CHECKSUM="NO" to the DEFINES file. Added the commented variable to src2pkg.conf. (03-make_dirs) remove leftover md5sums before starting new build. - (01-pre_process) revised compiler flags for athlon architectures. Even though several users reported no problems with using: TUNE_FLAGS="-march=athlon-xp -pipe -fomit-frame-pointer" and: OPTIM_FLAGS="-O3", at least one trusted user reported problems, even when using "-march=athlon". It's a much safer bet and more standardized to just stick to the regular ix86 settings for now. - (01-pre_process) added '! [[ $LIBDIRSUFFIX ]] && LIBDIRSUFFIX="64"' to the settings for x86_64 machines which are not bluewhite64. (11-create_docs) add LIBDIRSUFFIX to handling of pkgconfig *.pc files. This eliminates duplicate or incorrect copying of pkgconfig files on 64 bit systems using /usr/lib64. (DEFINES) Also added /usr/lib$LIBDIRSUFFIX to list of LIB_DIRS - (01-pre_process) added a general setting of LDFLAGS=-L/usr/lib$LIBDIRSUFFIX - (FUNCTIONS) add the ability to use personal src2pkg.conf files for each user on the system. If present, the users' file is source before the GLOBAL_CONF file in /etc/src2pkg/src2pkg.conf. This allows for personal settings by each user, but still allows the system administrator to override any settings which might be risky. The users' conf file should be named .src2pkg.conf and placed in their $HOME directory. - (05-fix_source_perms) changed order of automatically applying patches to try the -p1 option first instead of -p0. Debian patches were being wrongly applied with -p0 and creating a subdir($NAME-$VERSION) inside the sources. - (01-pre_process) add get_system_dirs routine to set standard directories - (06-configure_source) rewrite spec and rules file parsers and interactive configuration routine. Add a routine to check if the configure options for sysconfdir and/or localstatedir are available and add them to the configure options if they aren't already in there. - (16-post_process) unset exported CFLAGS, CXXFLAGS, LDFLAGS and DESTDIR - (04-unpack_source) add support for unpacking Slackware-style 'package framework' archives with the name '_$NAME.tar.gz' into the PKG_DIR - (04-unpack_source) Also add support for unpacking Resources and/or patches tarballs when found in the CWD. These are only unpacked if it hasn't already been done. A routine in 16-post_process removes them if the CLEANUP '-W' option is in use. This makes it easier to use a 'repo' directory of build sources. Any Resources or patches directories can be compressed and placed in the build directory so that extra materials can be handled easily without having to list all of them in EXTRA_SOURCES. The tarballs can be of either .tar.gz or .tar.bz2 type and can be named either Resources.tar.??/patches.tar.?? or NAME-Resources.tar.??/NAME-patches.tar.??, but should always unpack with the directory name Resources or patches. - (11-create_docs) remove links from /usr/share/doc to /usr/man - (12-compress_man_pages) remove links from /usr/share/man to /usr/man - (08-fake_install and 08A-destdir_install) add support for and detection of 'INSTALL_ROOT', 'PREFIX' or 'prefix' when 'DESTDIR' is not found and the user has asked to use the DESTDIR installation method. Since the DESTDIR variable is pretty undependable, we try for 'prefix' first, then DESTDIR, INSTALL_ROOT and lastly PREFIX. This makes it possible to create most packages using some sort of destination directory instead of using the 'JAIL' method(file-system translation) or the REAL method which spams the real root directory ('/'). Also, since both the JAIL and REAL methods need libsentry to track file creation we can use the DESTDIR method as the default again. It has been a toos-up between using JAIL or DESTDIR as the default behaviour since both of them will sometimes fail. The REAL method is very dependable, but we try to avoid using it because of the risks of overwriting existing files. Changed the default to back to DESTDIR in DEFINES. - (13-make_description) check for debian control file before checking for rpm spec files as the parsing for them is better - (src2pkg and FUNCTIONS) moved code for writing src2pkg scripts and default PKG_DESC(slack-desc) from the src2pkg wrapper to FUNCTIONS - (08-fake_install) add a rule to the do_generic_installation to look for executables in SRC_DIR/bin when not found in SRC_DIR - (12-compress_man_pages) add a rule to check for man-pages in SRC_DIR/man[1-8] when none have already een installed. - (06-configure_source) add ability to run bootstrap.sh (similar to autogen.sh) re-arranged the order for running to make autogen.sh or bootstrap.sh be used first, if present, before trying a generic autoreconf routine. While errors are ignored here anyway, autoreconf will sometimes fail where an autogen.sh works. - (06-configure_source) improved handling of sources which are configured using cmake -- 1.9.6-1 above - (01-pre_process) use indirect expansion to correctly check src2pkg directory options against critical system dirs. - (06-configure_source) use find to locate and remove all '.deps' files and dirs replace all occurences of libdir with libdir$LIBDIRSUFFIX - (01-pre_process) allow for null or / as prefix (check_dirs2). Programs which install to /bin or /sbin need to have no prefix. We may need to add code to check for double forward slashes with this change. - (12-compress_man_pages) look for man pages in CWD and Resources also - (06-configure_source) look for and use bootstrap scripts if autoconf files are incomplete - (04-unpack_source) - move hidden files up one dir along with everything else. Usually these files would be irrelevant, but trying to compile ocaml failed because it needs an included '.depend' file. - (16-post_process) comment out an irrelevant reference to EXEC_NAME that used to copy the contents of the current running script into REPORT. - (08-fake_install) set OBJ_DIR to $SRC_DIR in find_makefile if it hasn't already been set. OBJ_DIR was not being set if configure_source was skipped. - (07-compile_source) commented out 'make clean' -suddenly I've run into a couple of programs (example:nut) which create configuration files which are in the 'clean' list and are removed if running 'make clean' before compiling. This command was added because of compiling a bunch of DockApps which are commonly distributed with pre-compiled binaries included. Perhaps I'll replace this with a specific search for binaries which match the program NAME. - (10-strip_bins) added a STRIP_HARD section which strips .comment, .note and .compact_rel sections from ELF executables (code taken from rpm package) This is an advanced option that must be enabled explicitly with the STRIP_HARD=YES option and is only useful for building the smallest possible binaries and libraries -like for embedded systems. - (12-compress_man_pages) chmod all files to 644 - redesign and rewrite the 'src2pkg --setup' functionality. Running setup now creates and installs a separate package called 'src2pkg-helpers-x.x'. This makes it possible to not have to run 'src2pkg --setup' each time that the src2pkg package is upgraded. The sources for src2pkg-helpers are included in the src2pkg package, but when 'setup' is run, the separate package is created and installed. - src2pkg-helpers includes the libsentry and tar sources as before, but also includes the sources for coreutils-5.2.1. A patch is applied so that only a few binaries from coreutils are built. These include the main programs which might be used by Makefiles(or others) to create files, dirs and links. These are installed to /usr/libexec/src2pkg/bin. When src2pkg starts a build it adds this path to the front of the normal path so that these programs get used instead of the normanl system programs. The reason for using these programs from an old coreutils version is to avoid all problems of incompatibility and failure with the library-tracking features of libsentry regarding the new 'openat' functions. Since these functions are still a 'moving target' in both the kernel and glibc implementations this will avoid problems in the future. I'm doing this because libsentry still fails to properly track the chmod command when used on Slackware-12 or other systems which use glibc>=2.4 and coreutils >5.2.1. While not really critical to accurately track the chmod command for our purposes, this will avoid any possible problems. - (06-configure_source, 07-compile_source, 08-fake_install) changes to accomodate specifying the makefile in the MAKE_COMMAND. This required changes in several places so that something like: -m='make -f Makefile.unix' would work correctly in both compile and install routines. This is probably still imperfect, but seems to usually work. - (06-configure_source) changed the correction of hardcoded paths in Makefiles - (06-configure_source) use find to remove all dirs or files named '.deps' - (11-create_docs) advanced_docs now looks for *.desktop files in the CWD/pathces or CWD/NAME-patches directories if they exist - (05-fix_source_perms) Also check for patches in CWD/NAME-patches - (11-create_docs) Search for and install any xinitrc.* files in the CWD, CWD/patches, CWD/NAME/patches or CWD/Resources (I build lots of alternate window managers and they should be installed with their own xintrc file.) This routine installs them automatically to PKG_DIR/etc/X11/xinit. - (16-post_process) remove CWD/NAME-patches directory when doing cleanup, if ther is a corresponding NAME-patches tarball present. - (11-create_docs) advanced_docs Search for and install any xpm or png images which match the program name. Search is done in SRC_DIR, CWD, CWD/patches, CWD/NAME-patches and CWD/Resources - (06-configure_source) use 'read -e' in interactive (-Q) mode so that the input line is editable Note: I used to place all extra files like patches, pixmaps or wrapper scripts in a subdirectory of the CWD directory called Resources. But I also placed other files there like documents or original tarballs which are not essential to the build. These days I have been putting all files which are 'essential' to the build process in a subdirectory called 'patches' or NAME-patches. This makes it easier to keep essential extras all together and create a tarball of them. src2pkg now looks for these tarballs when de-compressing the sources, then routines which use the files there look for them in the 'patches' or 'NAME-patches' directory. For backward-compatibility the Resources directory is also searched. - (01-pre_process) Added another option for compile-time optimization. We already had a OPTIMIZE_4_SIZE option which passes '-Os' to the compiler. OPTIMIZE_4_SPEED provides an easy way to create binaries and libs which are compiled to run with maximum speed-optimization using '-O3' These provide a simple way to optimize binaries and libraries without having to learn all about the many gcc options - (06-configure_source) moved 'make clean' here -see note above about 'make clean' - (05-fix_source_perms) handle debian-style dpatch files. (I wanted to build gcc-2.96 which includes around 300 *.dpatch files and didn't want to take the trouble to convert them all to regular patch files). - (06-configure_source) add PRE_FIX to scons configure command - (06-configure_source) comment out 'export CXXFLAGS' -setting both CFLAGS and CXXFLAGS confuses configure scripts for sources which include libltdl which interprets it as trying to set two distinct architectures. This bug showed up when trying to compile libmcrypt-2.5.8. Thanks to 'tronayne' for finding this problem and reporting it. - (11-create_docs) advanced_docs -add routines to install configuration files named NAME.conf. Later, code in 14-make_doinst adds a '*.new files' routine to the doinst.sh script for automatic configuration of new conf files. - (11-create_docs) advanced_docs -add routines to install init files named rc.NAME. As above, a '*.new files' handling routine is added to the doinst.sh. But since init files are installed to /etc/rc.d they are meant to start a 'service' at boot-time. So, an extra routine is added to the doinst.sh which writes the necessary code to /etc/rc.d/rc.local which enables the service at boot-time. This makes it very easy to create these complex packages so that, usually, all that is needed to enable the service is to make the rc file in /etc/rc.d executable and edit the default settings in the config file which should ideally be named /etc/$NAME.conf - created a CHANGES file to include in the package. The CHANGES file is meant to show briefly the changes to the latest version which are visible to the user or otherwise of great significance. This should make it easier to distill the main changes for the average user, plus, since src2pkg now has a WIKI, it will help outline the most recent changes which might make it necessary to update the WIKI. - Speaking of the WIKI, it is located at http://src2pkg.net or http://www.src2pkg.net. Many thanks to Drew Ames and Timothy Goya for helping write some of the pages there, and especially to Pieter Sartain for providing the Domain Name, hosting the pages and setting up the WIKI. Very generous of all three of you and I'm extermely grateful! - (06-configure_source) add support for 'imakefile' (as opposed to Imakefile) - (04-unpack_source) fixed a long-standing quirk when unpacking archives which have no toplevel directory. I rarely come across these so it took a while to figure out what was going on. Unpacking the archives was succeeding alright, but the src2pkg routine was expecting to find a top-level directory and would mistakenly report an error if no directory was found. This was found while trying to unpack and compile gkermit-1.0-1.src.rpm and chmtools-0-2.src.rpm - (14-make_doinst) quietened an error message from ldd when showing package package dependencies(SHOW_DEPS) and there are no ELF executables in the package - (13-make_description) only copy new.slack-desc tp CWD when using -A (AUTO_SCRIPT) - (/usr/bin/src2pkg) fixed expansion of $SCRIPT variable -scripts weren't being executed when specified. Most people(and me) just use 'src2pkg -X' to run the first script found in the CWD. But all along, you were supposed to be able to specify which script to run. I discovered that this wasn't functioning correctly while working on the next item: - Added a drag-n-drop wrapper script. No kidding! I promised (or threatened) a long time ago that I would do this -I really should have done it sooner as it can be a real time-saver for those who make lots of packages. Just dragging an archive or src2pkg build script onto the icon for src2pkg-dnd causes src2pkg to run in the directroy where the archive or script is located. You can use this program by making a copy of it in your $HOME directory. Then you can open it with your favorite text editor and set up the options for how you want to use it. There are useful notes at the top of the file itself that explain how it can be used. I use it with the options set to -N if a tarball is dropped on the icon or to simply execute the script if a src2pkg script is dropped on it. - (05-configure_source) another change to the cmake routine -added the ability to switch between using a SRC_DIR/build directory or just building in the SRC_DIR. There doesn't seem to be a standard way to build cmake sources. Some insist that you build in a subdir of the sources, while others refuse to build correctly unless built in the main sources dir. Using the -O option (USE_OBJ_DIR) causes src2pkg to configure and build in SRC_DIR/build. Without the -O, it attempts to build in the main directory. If the -O option is not specified, src2pkg checks if there is already a 'build' subdirectory in the sources and uses it, if so. Luckily, cmake isn't widely used (and hopefully won't be!), so most users will never be bothered with the problems associated with cmake. (test-case: fms-1.0.tar.gz) - (06-configure_source) add support for packaging perl CPAN modules (Makefile.PL) hdlstart served as an example. - Added a drag-and-drop wrapper script to the examples. src2pkg-dnd allows you to use src2pkg by simply dropping archives or src2pkg scripts onto a desktop icon. See the README.examples and the text at the top of the src2pkg-dnd file for more details on how to use it. - (06-configure_source) refine get_rpm_config to do better substitution/deletion of invalid or unwanted configure options. - changed handling of conf files which install under /etc. In (11-create_docs) search for configuration files with the '.new' suffix as well as those with the '.conf' suffix. Then, in (14-make_doinst), instead of renaming all files under /etc with the '.new' suffix, only treat the ones that already have the '.new' suffix as ones that should have a config() routine written into the doints.sh. The former behaviour would rename all files which install under /etc with the '.new' suffix and then write a config() routine into the doinst.sh. While not harmful, not all such files need this handling(the doinst.sh config() routine preserves existing config files which have been changed, leaving upgrades to be done manually.) This method also was also limited to config files with the '.conf' suffix. While this is the most common naming scheme, it is not universal. By adding the '.new' suffix to the filename, any such config file can be automatically included in the package. In (14-make_doinst) only those files which have the '.new' suffix will have the config() routine written for it in the new doinst.sh file. Doing it this way has two benefits -allowing an easy mechanism to automatically include conf files no matter what they are named, while limiting the creation of config() routines to only those files for which it is wanted. The downside is that the user must be careful not to place other files in the current directory with '.new' as the filename suffix -else they will be copied into $PKG_DIR/etc Version-1.9.5 05 February 2008 - 05-fix_source_perms --handle different patch options automatically without the need to re-name patches to specify the -p? option - 08-fake_install --improved handling of the checks for install rule and DESTDIR by running a "dry-run" using 'make -n $INSTALL_RULE' and checking the exit status. This takes longer than grepping for an install rule, but sources which have the install rule hidden in a make.tmpl file or are using some other install rule would have to be checked for individually. It's easier and more reliable to check the exit status of the actual command. It may add a couple of minutes to the build time for very large packages which install lots of files. Still, this is better than having to write an even more complex routine which looks in many files for many different install rules using various formats and still not have them all covered. The old routine was fairly good, but lately several people have been trying to build sources which use both make.tmpl and/or weird un-guessable install rules. - DOCLIST can now include a subdirectory which will copied in its' entirety - (10-strip_bins) use --strip-debug for stripping static library archives since --strip-uneeded can cause problems more often - (13-make_description) handle slack-suggests and slack-conflicts files - (02-find_source) use '--tries=3 --timeout=15' as wget options - (14-make_doinst.sh) check for configuration files under $PKG_DIR/etc. If any are found that aren't already named with the '.new' suffix, change the name adding the suffix, then check to see if there is a 'conf()' routine in the doinst.sh file and add one if there isn't, plus a line for each configuration file found. Doing this with conf files prevents them from being overwritten when packages are upgraded if the conf files have been previously edited by the administrator. - (06-configure_source) add handling of sources which contain both a GNUmakefile and Makefile.in. we already did this the other way around where sources had both a Makefile and GNUmakefile.in. In either case, configuration causes the sources to contain both a Makefile and a GNUmakefile which seems to usually confuse the 'make' program. In both cases we rename the arbitrary file to disable it and allow the one generated by configure to be used. This feature can be bypassed by including USE_DEFAULT_MAKEFILES=YES in the src2pkg script. In practice I have only seen sources like this two or three times so most users will never be bothered by this either way. This current change was spotted in the sources for gnuplot. The former case where a GNUmakefile.in was present along with a Makefile was found in the old version of Abiword-1.0.7. - (01-pre_process) made changes to the get_flags function to accomodate the setting of CFLAGS for athlon-xp machines as well as setting the optimization flags for ppc, powerpc, s390 and s390x to -O0 (no optimization). athlon-xp flags are set to -O3 by default. - (src2pkg) when writing a build script with the -A or -N option, the line for the ARCH variable is commented out by default. This makes src2pkg scripts more portable for use on different architectures than the one on which the script is created. - (01-pre_process) allow MARCH_FLAG and CPU_FLAG to be set by the user. The standard values for Slackware (and most other standard distros) is to use -march=i486 and -mtune=i686 (or -mcpu=i686 with gcc<=3.4). By using a conditional statement here, a user who wants to 'abuse' the standards can do so. Many users want to do this in order to compiel applications for i686 only, thinking that some performance gains are to be had this way. The truth is that the performance gains are minimal unless the whole system (including glibc) is re-compiled. While this could set dynamically, src2pkg still defaults to i486/i696 for all ix86 machines. - (11-create_docs) fix checking for empty usr/share directory after possibly moving docs - (12-compress_man_pages) fix checking for empty usr/share directory after possibly moving man-pages - updated to libsentry-0.6.7.4 (only minor changes to debug format and upgrade version number) Version-1.9.4 31 January 2008 - 08-fake_install make do_generic_installation check that $OBJ_DIR/$NAME is both a file and is executable. Just checking to see if it was executable returns a false positive if a directory named $OBJ_DIR/$NAME is present. (Discovered trying to package ncurses) - The above bug was uncovered because grepping for an install rule was failing because of Makefile syntax: check for all alternative syntaxes: 'install:' 'install :', 'install::' and 'install ::' Also, use full path to Makefile (${OBJ_DIR}/$MAKEFILE) - 12-compress_man_pages - silence errors from trying to uncompress or compress links in the man directory by using 'find -type f'. Also only use chmod 644 on files and use chmod 755 for links - 05-fix_source-perms -fix checking for SHOULD_AUTORECONF so that autoreconf is not done if configure scripts have been patched directly. Note: Patching configure files directly (instead of patching configure.ac or configure.in) is bad form. Still some packagers do this so we let them get away with it. Normally, when patching configuration files, all changes should be made in *.ac or *.in files and then autoreconf should be run to apply the changes. But some developers/packagers patch both the *.ac/*.in files *and* the configure script -running autoreconf in these cases usually erases the changes made to the configure script. This is another case where building ncurses shows weirdness. - fix removal of PKG_DIR/usr/share directory in 11-create_docs and 12-compress_man_pages when it is empty after moving docs or man-pages - src2pkg --fix truncation of MAKE_COMMAND which contains '=' - src2pkg --add comments about $CWD, $SRC_DIR and $PKG_DIR to end of newly-created scripts to make cut-n-paste editing easier for the user - trackinstall --same as above for src2pkg and also cleanup help screen - 12-compress_man_pages --compress man-pages installed under /usr/local/man and info pages installed under /usr/local/info. Suggested by Mikhail Zotov. - added check for $SRC_DIR/$VERSION in search for non-standard configuration directories pointed out when trying to compile dmraid (unpacked dir layout: dmraid/1.0.0.rc14) - 01-pre_process --add athlon-xp to supported architectures -needs to be tested so I'll have to try to find a src2pkg user who is building on athlon. Also added powerpc - 06-configure_source --added running ./configure --help after show_requires - 14-make_doinst --added handling of doinst.sh.gz files Version-1.9.3 12 January 2008 - fixed a missing '#' comment marker in make_description. Ouch! This was causing database files in /var/log/packages to display The 'handy ruler' line when listing package contents. ugly, ugly. - fixed a problem in make_package with detection of the static tar version which caused package contents to be wrongly listed in the package database files in /var/log/packages. This looked bad but didn't cause any harm -except that it would prevent proper removal by removepkg. This has to do with the way tar-1.13 lists archive contents -inside an archive all paths begin with './' and the top directory './' is there also with tar-1.13. However, when listing the contents tar-1.13 strips off the './' for all paths except the first (top) dir. - switched the default installation method from -DEST back to -JAIL. It's kind of a toss-up between these two methods as neither one will always work. In fact many packages must be built using the -REAL method, including most packages like the Opera browser which use an 'install.sh' or other such script to install files. - updated man-pages to reflect the above changes - added code to the doinst.sh to handle cleanly installing the src2pkg 'noarch' package using upgradepkg. The feature of offering to compile libsentry and tar-static during installation is still questionable and may be dropped. I'd be glad top hear what users think about it. - Thanks to Tim Goya and Adrien Nader for reporting bugs in the last version. Version-1.9.2 03 January 2007 - src2pkg-1.9.2-noarch-2 (fixed an error in fake_install which affected installing binary packages like opera) - added a couple of extra checks to fix_pkg_perms to set /var/run and /var/lock if they are found in the package - fixed the search for SRC_DIR/doc SRC_DIR/docs when no docs have been installed - set OBJ_DIR to CONFIG_DIR instead of SRC_DIR in fake_install - add an extra check to make_description and read_pkg-info_desc to make it handle *.lsm description files also. - added some new examples to the examples in the doc directory. These show how to use some of the most common options in src2pkg scripts, as well as very advanced usage. - Finally forked the installwatch library and program after more changes. The amount of changes and version numbers are increasing quickly. It seemed best to go ahead and fork installwatch since development of the official version seems to be competely stalled. The new name for the program is 'sentry' and the library is 'libsentry'. See the libsentry sources for more details of the rationale and changes. The last change using a patch with the old name was to fix a bug which caused the library to fail to compile on x86_64 system using glibc<=2.4. Thanks to Piete Sartain for reporting the bug, and to him and Xavian-Anderson Macpherson for testing the fix. See notes for unreleased version-1.9.0 for other recent changes. - Fixed a bug in correction of hard-coded installation paths in Makefiles where paths under /usr/local (not /usr/local itself) were being mangled. This was fixed to ignore all paths at or under /usr/local and paths under /opt. Added a routine which disables correction of docs and man-pages when the above prefixes are used. This means that if you use these prefixes you are on your own for creating or correcting documents and for compressing any man-pages. Thanks to Stanislav Mukomela for finding this bug while trying some unusual prefixes. (in fake_install) - Added a switch to src2pkg for writing the STD_FLAGS variable to src2pkg scripts *uncommented* when the variable has been set on the command-line. - added setting of PRE_FIX variable to trackinstall - changed point of sourcing FUNCTIONS in trackinstall so that options set on the command-line are preserved without exporting them. - removed unused do_track_install function from FUNCTIONS - cleaned up some prompts in various functions - added a do_generic_installation function to FUNCTIONS and fixed missing check for 'install' rule before running any other installation type. This functionality had gotten lost when I separated the installation types. - fixed some code in get_rpm_config and get_rpm_config2 which translates rpm spec file variables into regular configure options(infodir & others) - changed the code for stripping leading slash from prefixes and added code to strip trailing slashes from prefixes also (pre_processing) - updated man-pages to reflect minor changes. - updated the README wiith information on 'src2pkg --setup' - check for BIN_DIRS in package and make everything inside executable. We used to do this and then started using 'find' to search for all ELF executables. Now we do both so that scripts in any BIN_DIR get set also. - make adding of dependency information to slack-desc files and generation of slack-required file optional. New options are in src2pkg.conf, but commented out. Default is to add the info to the slack-desc file and create a slack-required file in the package. - added automatic setting of --libdir=/usr/lib64 to pre_processing (in get_flags) for slamd64. This should make usage easier on some x86_64 systems. This is ignored if the systewm is BlueWhite64. - added code in create_package to automatically write install-info code to doinst.sh if there are info pages in the PKG_DIR and the install-info code is not already in the doinst.sh - Finished splitting the main src2pkg shell functions into individual files. This makes the code easier to read, understand and work on. - The src2pkg package is now a 'noarch' package without compiled binaries and libraries. This is to avoid having to build separate versions for the various kernels and architectures. When the package is installed, the user will be prompted to choose whether to setup src2pkg during installation. The package installs the sources for libsentry and tar-1.13 in /usr/src/src2pkg/src2pkg. If the user(root) does not choose to have src2pkg compile these sources during installation, the programs can be compiled after installation by running the command 'src2pkg --setup'. Of course, the user must be logged in as user 'root' to do this -otherwise it will not be done. If a user tries to run 'src2pkg --setup' they are warned and src2pkg exits. If 'root' forgets to do this step and later tries to create a package, src2pkg will run src2pkg.setup before continuing package creation. The src2pkg.setup script is located with the sources and creates all temporary files in /tmp/src2pkg.setup and deletes them after building. This is a good way to make sure that the system has everything needed for compiling sources and also makes sure that all the libraries and programs supplied by src2pkg are compatible with the system -no matter which architecture, kernel or OS version they are running. - clean up new.doinst.sh, new.slack-desc and $NAME.src2pkg.auto files in the current directory if '-W' (CLEANUP) is asked for. Suggested by Stanislav Mukomela - removed fakeroot and busybox. The use of fakeroot for allowing users to make packages would only open up security holes if used in a way that would provide any advantage over simply using the tar programs' ability to reset ownerships when the package is created. The buybox static programs are not really needed anymore since the REAL method of installation is no longer the default. Hopefully nobody will have the idea of using the REAL method to compile glibc, bash or coreutils. Version-1.9.1 01 January 2007 (unreleased) - use fakeroot to allow normal users to build packages. The fakeroot daemon is started just before running fix_pkg_perms and runs until package creation is finished. We check to be sure it is running when the package is about to be compressed also and start it if not. - use busybox-1.2.2 as it has ome fixes for tar in it. This is the last version of busybox which can be compiled statically against glibc libraries. - include tar functionality in busybox and use it for unpacking archives. tar-1.13 fails to properly unpack some large archives with long paths and/or long filenames. Changes in unpack_source and in pre_process so that TAR_STATIC gets aliased to tar-1.13 and BB_TAR gets aliased to tar(from busybox) Version-1.9.0 21 December 2007 (unreleased) - The big fix for this version: added handling of glibc 'fchmodat' calls to installwatch library. This is the only function call I've been able to pinpoint that was failing under glibc>=2.5(Slackware>=12.0). I'm still trying to find any other function calls which may be failing. The 'failure' just means that the operations aren't logged. The other fixes in installwatch-0.6.7.0 (in src2pkg-1.8) seem to have stopped the really weird things that were happening in the official versions of installwatch-0.7.0beta(1-5). I am still writing tests to search for other function calls which may fail, though some of the calls that installwatch tracks are not really necessary for the way we use it. Also added (in installwatch-0.6.7.2) a call to reduce relative path elements from the truepath. Version-1.8 04 December 2007 - Lots of *big* changes this time! I usually try to avoid this as it reduces the chances of introducing bugs. Hopefully I've tested this release enough to make sure no serious defects have gotten through. - Some of the main functions have been split out from the FUNCTIONS file into smaller files. The code bas has grown to over 3,000 lines and it was getting more difficult to scroll through the code to find the section I want to work with. This may make it a little harder to understand the execution order for some people, but it makes my work a little easier. I'll probably split the code up even more in another version. - I've finally introduced a later version of the installwatch library which src2pkg uses to track the files which are created during package making. I spent several weeks on this and added quite a few patches from other distros and individuals. This new version is based on the last official version (0.7.0beta5) but fixes some of the bugs which were never addressed by the maintainer. Some nagging problems were addressed which usually only show up when using the library with later versions of coreutils (>=6.9) and glibc >=2.5 along with the Linux kernel >=2.6.16. These problems revolve around some new functions called the 'openat' functions. It was these functions that have caused problems when using installwatch or checkinstall with any modern Linux distribution. The suggested fix was to disable file system translation which was one of the best new features introduced in installwatch-0.7.0beta1 in 2002. When working, this feature allows you to install files into a what might be called a 'virtual root'. That is files are not written to your main file system. Instead they are written into a subdirectory (the PKG_DIR). This allows for a much less intrusive way of running 'make install' or other installation command. By now the translation feature is more dependable and accurate than the old way of using the backup feature of installwatch to protect your system. I am still, however, working on improving the functionality of the backup feature so that it will work just as well as the translation feature -it already works much better than before. - The above fixes still make it possible to build packages the old way, by doing a real installation of the software, copying the files into the PKG_DIR and then restoring any original files which were overwritten. But, you can now use the 'virtual root' feature to create packages in a safer, less intrusive way. This option is called JAIL_ROOT. We've also brought back the possibility to run 'make install' using the DESTDIR, although it is probably the least reliable of the three methods. The JAIL_ROOT method is basically the same, but it works even with sources which don't support the use of DESTDIR or which use one of the similar variants like INTSALLROOT or PREFIX. src2pkg now uses the JAIL_ROOT installation method by default, but you can override this in your src2pkg scripts or from the command-line by using the '-DESTDIR' option for installation using the DESTDIR variable, or the '-REAL' option for installation using the old method of really installing and backing up overwritten files. The default JAIL_ROOT method uses the '-JAIL' option. If you try using the DESTDIR option and it is not supported by the source Makefiles, src2pkg will switch and use the JAIL_ROOT method instead. The DESTDIR method doesn't use the installwatch library to track file creation. Instead files are installed directly into the PKG_DIR. This is a more traditional way of creating package content and is preferred and trusted by many people. - Using the newer version of installwatch required some changes to the src2pkg functions to accomodate the new features and environmental variables. These changes are mostly transparent to the user except for the new options they present. - Now on to other major changes: - src2pkg can now retreive and use more information from rpm spec files or debian 'control' and 'rules' files if they are included in the sources: - src2pkg can now read the package description information from a spec or control file and use that to create better slack-desc files without the user having to edit them manually or enter text in interactive mode. - The interactive routine which allows the user to input text for the slack-desc file was also improved. Instead of limiting the user to inputing a small one line description, the user can now type in lots of text which will be wrapped into the appropriate line length and then inserted into the description file. - src2pkg also now adds dependency information to the description files and also generates a slack-required file which is used for compatibilty with the slapt-get package management program. This file is also required for packages which are submitted to linuxpackages.net, so this feature should make it easier for users to have their packages accepted for inclusion on that website. - src2pkg can also retreive options to pass to the configure script from a spec file or debian rules file. The options are translated into Slackware-conformant options and may help to ensure successful configuration and compilation of sources in some cases. - Regular users can now use src2pkg to create packages. src2pkg checks to make sure that the user has permission to write to all the directories it needs to work in. And it checks to make sure that the '-REAL' installation option is not being requested. Proper permissions for the package are achieved by using the '--owner' and '--group' options for tar. When the final compressed package is created all file ownerships are set to root just as when you run src2pkg as user 'root'. Several people had asked for this feature -it turned out to be fairly easy to implement it. - The src2pkg program wrapper now installs to /usr/bin instead of /usr/sbin so that it is in the normal path for regular users. Same for trackinstall. - re-wrote the tracklist utility to use the new installwatch - added more thorough check for documents when none were installed by the Makefile -checks for SRC_DIR/doc and SRC_DIR/docs directories. - If no man-pages were installed by the Makefile, check for man-pages in the SRC_DIR and in SRC_DIR/debian (if it exists) and copy to the PKG_DIR - added setup.py to the list of valid keyfiles. If src2pkg finds a setup.py script in the sources during configure_source, it sets the INSTALL_LINE to './setup.py build install' so that python modules get built automatically. Thanks to LQ member bassmadrigal for bringing up this change when he tried to build mutagen, hoping that src2pkg just knew what to do. Now it does. src2pkg will generate a description file for python modules from a PKG-INFO file, if present. - added support for using a BASE_URL for downloading sources and extra source files. This means that instead of giving the full URL for each item to download, a BASE_URL can be specified and other items to be downloaded can be given as a relative path to the BASE_URL. - added 'ls' to the busybox static commands - added kernel version signiature to the src2pkg source build script. This allows me to easily create two versions with the same build number, but with a different signiature. This is needed because the static busybox binary cannot be used with both kernel versions. When built with kernel-2.6.xx and glibc>=2.5 the installwatch library contains extra features. And busybox compiled statically under kernel 2.6.xx will not run on systems with a 2.4 kernel. Note: If you download a pre-built package of src2pkg, be sure to get the proper version for your kernel. If you are running Slack-12.0 or greater, you should get the src2pkg package with the '_K26' signiature in the package name. If you are running src2pkg with an older version of Slackware and are using a kernel from the 2.4 series, then use the src2pkg package with _K24 in the name. Version-1.7 16 November 2007 - fixed some code in examine_source which distinguished tarballs converted with rpm2tgz, but failed when unpacking other, more common tarballs which contain other compressed archives. - added support for rpm archives which contain a plain tar archive. - fixed missing 'cd $CONFIG_DIR' in autoreconf routines - added an interactive mode which prompts the user for input in 2-3 places where applicable. The options can be activated as the default behaviour in /etc/src2pkg/src2pkg.conf (either individually or all of them) or all can be activated with the '-Q' option when using src2pkg or trackinstall. The option QUERY_FOR _EXTRA_CONFIGS runs '$CONFIG_COMMAND --help' in the CONIFG_DIR to show the options available which can be passed to the configure script. It then waits for user input before continuing. The option CONFIRM_BUILD pauses after a successful configuration of sources and prompts the user to continue or quit. The option QUERY_FOR_PKG_DESC pauses during creation of the default slack-desc (or other PKG_DESC file) and prompts for a one-line description of the package, which is written to the third line of the description file. For those who miss being interrupted by checkinstall... Thanks to LinuxQuestions user Jim(LocoMojo) for the suggestion and patch demonstrating the desired behaviour. This also adds the extra options to the src2pkg.conf file, so if you want to use the new options you'll need to update your src2pkg.conf file manually with the new one (src2pkg.conf.new). - added support for builds using 'cmake'. It took a while to figure out how to pass the desired PRE_FIX/PREFIX non-interactively without hosing the other envronmental variables. - fixed automatic correction of PRE_FIX/PREFIX in Makefiles so that all are done, instead of only the top level. - suppressed display of the whole contents of rpm .spec files or debian/control files when using the '-R' (REPLAY_ERRORS) option. - added (again) removal the file $PKG_DIR/usr/info/dir to avoid whacking the much (and rightly) maligned functionality of 'info'. - rewrote condtional code for stripping libraries - changed the installation directory for pkgconfig *.pc files for LFH standard conformance (using /usr/lib/pkgconfig as these are architecture dependent files). - updated man-pages and their version numbers - changed to use our own hacked version of the installwatch libraries (0.63.a1) which still works fine, thank you, as opposed to the latest official versions (all of the 0.7.x versions are broken and may cause serious problems with your system). I say 'hacked' -the only difference between this version and the standard installwatch-0.6.3 is the inclusion of one useful patch backported from 0.7.x and a fix to the installwatch test program. - re-instated the 'tracklist' wrapper. Edited to remove unused code and paths are adjusted to use the installwatch wrapper which we now install to /usr/bin. Since Slackware no longer includes checkinstall we 'take over' the normal path for the installwatch wrapper. For those who really dislike or mistrust what src2pkg and trackinstall do, the tracklist program is completely non-intrusive and just produces a list of files and directories created by whatever command it is called with, without altering any content. In other words, it's just like using the plain 'installwatch' command, except that it parses the installwatch log to produce a FILELIST in the current directory. - src2pkg has been reviewed by LinuxQuestions user lufbery (Drew Ames) for the online magazine Linux.com. Article is due to be published on Thanksgiving Day 2007. A hearty thanks to Drew for his efforts and helpful criticism Version-1.6 - strip leading '/' characters from PRE_FIX inetrnally. This means that scripts which have $PKG_DIR$PRE_FIX will need to use $PKG_DIR/$PRE_FIX instead. This is more intuitive in scripts, I think, and is consistent with other usage. You can still give the PRE_FIX with a slash but it will be removed internally. - give each line in the PKG_DESC(slack-desc) file a variable name which can be specified or generated. These are named BLURB_1 to BLURB_13. By default BLURB_1 is set to show the name of the program, BLURB_3 is "No description was given for this package." and BLURB_11 is set to 'Packaged by src2pkg'. This can be used to add group-related info or dependencies. - Check for patches in the CWD before checking for a ./patches directory If there are patches in the CWD, patches in the patches directory are ignored. This allows you to have a directory named 'patches' in your build directory(CWD) with unused patches. - When patches are applied a list of the files patched is created inside the SRC_DIR. This list is examined to see if any *.ac, *.in or *.am files were modified. If so autoreconf -if is run in the sources -otherwise autoreconf is _not_ run as it takes a long time and may undo changes performed by the patching -this is especially true for crude patches which wrongly patch the 'configure' script without patching the corresponding configure.ac or configure.in files. Same goes for directly-patched Makefiles. DEBUG_FILELISTS will create a copy of the list of patched files in the CWD. - Remove extra whitespaces from CONFIG_ARGS - Use less code to correct Makefile prefix - Show a prompt and be verbose when running 'make clean' in verbose mode. - Fixed a reference to unused $INSTW_LOGFILE (installwatch-0.7). - added support for s390x ARCH - added SRC_DIR/source to CONFIG_SUBDIR search list. Thanks to "browser" on the LinuxQuestions Slackware forum for trying to compile samba with src2pkg which pointed out a useful, if obscure, case which might apply elsewhere. - fixed error if using src2pkg -X and there are multiple src2pkg scripts present - fixed substitution of PRE_FIX in automatically-corrected Makefiles. - added a FAQ (more like a short tutorial and made a few additions/changes to html documentation. Version-1.5 - fixed a missing case statement that caused the internal static tar program to fail when unpacking archives in verbose mode. Thanks to James Mueller for quickly reporting this. - more POSIX fixes: 'head -1' changed to 'head -n 1' in several places in src2pkg, trackinstall and FUNCTIONS - stopped using 'source' internally and in src2pkg or TrackBuild scripts. We used to use '.' but prefer using 'source' as being more readable. But it is not supported under ash, dash and sh. - Changed code which required awk to generate the 'Handy Ruler' in new slack-desc files. If awk is not present this will now still succeed. - eliminated the only usage of 'touch' in the same routine as above. - eliminated a call to sed when counting valid lines in slack-desc - Allow description files (slack-desc) with 9-13 lines. - Add BLURB_1 and BLURB_2. src2pkg usually writes a desc file with 11 lines. Using BLURB_1 and/or BLURB_2 will add extra lines to these 11 which can be used for whatever - fixed src2pkg build script to insure that src2pkg builds correctly under other architectures, such as _x86_64, ppc or s390. Thanks to Piete Sartain for testing this on _x86_64. This is a little tricker now that we include both statically compiled binaries and shared libraries in the package. Version-1.4 - use internal statically-linked binaries of tar and other programs which are used for critical operations, such as when restoring overwritten files just after 'make install' and before /sbin/ldconfig is run. This makes it possible and safe to normally compile and package tar itself without problems. It also means that if you've whacked your glibc somehow, your system should still get restored. I'm working toward a smooth way to use src2pkg during a complete system rebuild or bootstrap build, so other internal binaries may be included later. Currently we use a separate binary of tar and the rest of the programs are supplied by busybox. These programs are run mostly in the fake_install function: cat, cp, cut, egrep, grep, mkdir, rm, sort, tar and uniq The statically linked tar is used throughout src2pkg, so no external tar is needed by src2pkg. - integrated code for mini_installpkg using our static tar. This means that src2pkg no longer needs the Slackware pktools package to be installed either, since it already included the mini_makepkg routine. installpkg or other install program can still be used, if needed. The internal installer is enabled by default by setting INSTALLPKG="internal" in the DEFINES file. - added the ADM_DIR_NAME variable to DEFINES. mini_installpkg uses this to allow flexibility of usage with other distros which install database files somewhere besides /var/log/packages - better handling of non-standard files in the /install directory. - moved code to generate database files into a separate function so it can be used by mini_installpkg as well as during post_process. - src2pkg -N uses get_patch_list to check for patches - if patches have been applied and there is a Makefile.am, run autoreconf -if in the sources. Correctly patched configuration files need this to take effect. Badly patched config files may get whacked, though, so you can disable this behaviour for the package by using AUTORECONF=NO in your src2pkg script. - use uname -m to get arch info instead of uname -i - added some more comments to FUNCTIONS Version 1.3 - downgraded to installwatch-0.6.3 again. After about 2 weeks of testing I found a serious bug in installwatch which causes your compiler and compiler libs to be removed from your system when creating some packages. I discovered it while compiling libbonobo-2.14.0. - included new html docs -I really hope that these are useful as I would much rather write code than documents. They still need some work... - changes to src2pkg command-line options (-V is now DEBUG) (-R is REPLAY_ERRORS) - fixed a problem with USE_OBJ_DIR not working sometimes. - src2pkg program can now download a raw src2pkg script and then execute it. Version 1.2 - added URL handling for src2pkg scripts - upgraded to installwatch-0.7.0beta5 - improved auto-patching lets you specify the '-p ?' option for a patch by putting the option in the patch name: some-fixes.p0.diff would be applied with '-p 0' patching order can be controlled by specifying PATCHLIST - added handling of extra sources. For now these must be written into a script with EXTRA_SOURCES='URL-list' These changes make bootstrapping very easy by allowing src2pkg to download a script which then can download other needed sources for a build. - tracklist has been moved to pasture for now. It needs to be re-written for the new installwatch. Version 1.1 -updated the build script to detect and compile for x86_64 ARCH -added support for x86_64 and s390 to FLAGS, etc -added auto-patching feature -added handling of URL and downloading of sources -updated code for comatibility with BASH-3.2 -code cleanups -updated man-pages and README -added updating and execution of scripts -added routine to check for SRC_DIR/doc if no docs were installed and allow build to continue if no docs are present. -fixed a 'gotcha' in the source unpack routines where the unpacked archive has no version number and contains a binary with the same name