diff --git a/README b/README index e4340dddb5..a9b4d802cd 100644 --- a/README +++ b/README @@ -5,23 +5,24 @@ The following software is required in the host system to build XBPS binary packages: - * GNU GCC C++ - * GNU Make - * GNU Bison + * GNU awk + * GNU bash + * GNU bison + * GNU gcc c++ (development package) + * GNU gettext (development package) + * GNU make + * GNU patch + * GNU texinfo * fakeroot - * wget OR curl OR fetch (statically linked or no additional deps) * perl * sudo -Please note that wget/curl or any program used to fetch distfiles, -must be statically linked or if shared, it should be only linked to libc. -This is required to not depend in external libs while building packages -in the chroot. - Run "make install clean" at the top level directory, xbps-src and its shell utilities will be installed into /usr/local by default (can be changed by setting PREFIX and DESTDIR). +DONT FORGET TO EDIT "$PREFIX/etc/xbps-src.conf" BEFORE USING IT! + ------------------------------------------------------------------------------ HOW TO BUILD/HANDLE PACKAGES FROM SOURCE ------------------------------------------------------------------------------ diff --git a/templates/acl/patches/disable_rpath.diff b/templates/acl/patches/disable_rpath.diff deleted file mode 100644 index e7a5dfa4bb..0000000000 --- a/templates/acl/patches/disable_rpath.diff +++ /dev/null @@ -1,36 +0,0 @@ ---- include/builddefs.in.orig 2009-04-24 02:26:13.747541261 +0200 -+++ include/builddefs.in 2009-04-24 02:26:54.954519524 +0200 -@@ -27,14 +27,14 @@ PKG_RELEASE = @pkg_release@ - PKG_VERSION = @pkg_version@ - PKG_PLATFORM = @pkg_platform@ - PKG_DISTRIBUTION= @pkg_distribution@ --PKG_BIN_DIR = @bindir@ --PKG_SBIN_DIR = @sbindir@ --PKG_LIB_DIR = @libdir@@libdirsuffix@ --PKG_DEVLIB_DIR = @libexecdir@@libdirsuffix@ --PKG_INC_DIR = @includedir@ --PKG_MAN_DIR = @mandir@ --PKG_DOC_DIR = @datadir@/doc/@pkg_name@ --PKG_LOCALE_DIR = @datadir@/locale -+PKG_BIN_DIR = $(DESTDIR)@bindir@ -+PKG_SBIN_DIR = $(DESTDIR)@sbindir@ -+PKG_LIB_DIR = $(DESTDIR)@libdir@@libdirsuffix@ -+PKG_DEVLIB_DIR = $(DESTDIR)@libexecdir@@libdirsuffix@ -+PKG_INC_DIR = $(DESTDIR)@includedir@ -+PKG_MAN_DIR = $(DESTDIR)@mandir@ -+PKG_DOC_DIR = $(DESTDIR)@datadir@/doc/@pkg_name@ -+PKG_LOCALE_DIR = $(DESTDIR)@datadir@/locale - - CC = @cc@ - AWK = @awk@ ---- include/buildmacros.orig 2009-10-25 09:35:28.000000000 +0100 -+++ include/buildmacros 2009-10-25 09:35:42.000000000 +0100 -@@ -40,7 +40,7 @@ OBJECTS = $(ASFILES:.s=.o) \ - $(LFILES:.l=.o) \ - $(YFILES:%.y=%.tab.o) - --INSTALL = $(TOPDIR)/include/install-sh -o $(PKG_USER) -g $(PKG_GROUP) -+INSTALL = $(TOPDIR)/include/install-sh - - SHELL = /bin/sh - IMAGES_DIR = $(TOPDIR)/all-images diff --git a/templates/acl/template b/templates/acl/template index 6fb92efee2..952fddd2ba 100644 --- a/templates/acl/template +++ b/templates/acl/template @@ -3,11 +3,9 @@ pkgname=acl version=2.2.48 distfiles="ftp://oss.sgi.com/projects/xfs/cmd_tars/acl-${version}.src.tar.gz" build_style=gnu_configure -configure_env="ac_cv_path_LIBTOOL=${XBPS_MASTERDIR}/usr/bin/libtool - ac_cv_path_MSGFMT=${XBPS_MASTERDIR}/usr/bin/msgfmt - ac_cv_path_MSGMERGE=${XBPS_MASTERDIR}/usr/bin/msgmerge - ac_cv_path_XGETTEXT=${XBPS_MASTERDIR}/usr/bin/xgettext" -make_install_args="install-lib install-dev" +make_install_target="prefix=$XBPS_DESTDIR/$pkgname-$version/usr + PKG_MAN_DIR=$XBPS_DESTDIR/$pkgname-$version/usr/share/man install + install-lib install-dev" short_desc="Access Control List filesystem support" maintainer="Juan RP " checksum=b45e21549c9752ad9b99862cce79d7ec5ef4b32c3e95a39f79f0a8442b86476e @@ -15,11 +13,8 @@ long_desc=" This package includes support for Access Control Lists support for supported filesystems." -base_chroot=yes keep_libtool_archives=yes - subpackages="devel progs" -Add_dependency build libtool Add_dependency build gettext Add_dependency run glibc Add_dependency full attr diff --git a/templates/anacron/template b/templates/anacron/template index 83f215cdec..93e447ed8e 100644 --- a/templates/anacron/template +++ b/templates/anacron/template @@ -24,7 +24,7 @@ Add_dependency full glibc Add_dependency full bash Add_dependency full run-parts -pre_configure() +pre_build() { sed -i 's/const int isleap;/int isleap;/' $wrksrc/gregor.c } diff --git a/templates/attr/patches/disable_rpath.diff b/templates/attr/patches/disable_rpath.diff deleted file mode 100644 index 96756a07b1..0000000000 --- a/templates/attr/patches/disable_rpath.diff +++ /dev/null @@ -1,36 +0,0 @@ ---- include/builddefs.in.orig 2009-04-24 01:39:53.424180873 +0200 -+++ include/builddefs.in 2009-04-24 01:41:04.518498094 +0200 -@@ -27,14 +27,14 @@ PKG_RELEASE = @pkg_release@ - PKG_VERSION = @pkg_version@ - PKG_PLATFORM = @pkg_platform@ - PKG_DISTRIBUTION= @pkg_distribution@ --PKG_BIN_DIR = @bindir@ --PKG_SBIN_DIR = @sbindir@ --PKG_LIB_DIR = @libdir@@libdirsuffix@ --PKG_DEVLIB_DIR = @libexecdir@@libdirsuffix@ --PKG_INC_DIR = @includedir@/attr --PKG_MAN_DIR = @mandir@ --PKG_DOC_DIR = @datadir@/doc/@pkg_name@ --PKG_LOCALE_DIR = @datadir@/locale -+PKG_BIN_DIR = $(DESTDIR)@bindir@ -+PKG_SBIN_DIR = $(DESTDIR)@sbindir@ -+PKG_LIB_DIR = $(DESTDIR)@libdir@@libdirsuffix@ -+PKG_DEVLIB_DIR = $(DESTDIR)@libexecdir@@libdirsuffix@ -+PKG_INC_DIR = $(DESTDIR)@includedir@/attr -+PKG_MAN_DIR = $(DESTDIR)@mandir@ -+PKG_DOC_DIR = $(DESTDIR)@datadir@/doc/@pkg_name@ -+PKG_LOCALE_DIR = $(DESTDIR)@datadir@/locale - - CC = @cc@ - AWK = @awk@ ---- include/buildmacros.orig 2009-10-25 09:35:28.000000000 +0100 -+++ include/buildmacros 2009-10-25 09:35:42.000000000 +0100 -@@ -40,7 +40,7 @@ OBJECTS = $(ASFILES:.s=.o) \ - $(LFILES:.l=.o) \ - $(YFILES:%.y=%.tab.o) - --INSTALL = $(TOPDIR)/include/install-sh -o $(PKG_USER) -g $(PKG_GROUP) -+INSTALL = $(TOPDIR)/include/install-sh - - SHELL = /bin/sh - IMAGES_DIR = $(TOPDIR)/all-images diff --git a/templates/attr/template b/templates/attr/template index 8de45d899e..fc1beece04 100644 --- a/templates/attr/template +++ b/templates/attr/template @@ -3,22 +3,17 @@ pkgname=attr version=2.4.44 distfiles="ftp://oss.sgi.com/projects/xfs/cmd_tars/attr-${version}.src.tar.gz" build_style=gnu_configure -configure_env="ac_cv_path_LIBTOOL=${XBPS_MASTERDIR}/usr/bin/libtool - ac_cv_path_MSGFMT=${XBPS_MASTERDIR}/usr/bin/msgfmt - ac_cv_path_MSGMERGE=${XBPS_MASTERDIR}/usr/bin/msgmerge - ac_cv_path_XGETTEXT=${XBPS_MASTERDIR}/usr/bin/xgettext" -make_install_args="install-lib install-dev" +make_install_target="prefix=$XBPS_DESTDIR/$pkgname-$version/usr + PKG_MAN_DIR=$XBPS_DESTDIR/$pkgname-$version/usr/share/man install + install-lib install-dev" short_desc="Extended attribute support library for ACL support" maintainer="Juan RP " checksum=e01fa00686072a02dddf994e6217be950f51c1dc0852ad2e210c48b6e8de793a long_desc=" This package includes Extended attribute support library for ACL support." -base_chroot=yes keep_libtool_archives=yes - subpackages="devel progs" -Add_dependency build libtool Add_dependency build gettext Add_dependency run glibc diff --git a/templates/autoconf/template b/templates/autoconf/template index fd3a954950..2ed3a4d867 100644 --- a/templates/autoconf/template +++ b/templates/autoconf/template @@ -20,3 +20,4 @@ Add_dependency full gawk Add_dependency full diffutils Add_dependency full m4 Add_dependency full perl +Add_dependency build texinfo diff --git a/templates/automake/template b/templates/automake/template index 39b86c9e67..f1af3dcad5 100644 --- a/templates/automake/template +++ b/templates/automake/template @@ -17,3 +17,4 @@ long_desc=" noarch=yes Add_dependency full autoconf 2.60 Add_dependency full libtool +Add_dependency build texinfo diff --git a/templates/bash/template b/templates/bash/template index f0022b3f23..ba1251432e 100644 --- a/templates/bash/template +++ b/templates/bash/template @@ -31,12 +31,13 @@ long_desc=" modification." essential=yes -base_chroot=yes register_shell="/bin/bash" Add_dependency full glibc Add_dependency build ncurses Add_dependency build texinfo +Add_dependency build gettext +Add_dependency build bison Add_dependency run ncurses-libs Add_dependency run coreutils diff --git a/templates/bison/template b/templates/bison/template index 805b4d8b4b..4c632ecf6c 100644 --- a/templates/bison/template +++ b/templates/bison/template @@ -12,3 +12,4 @@ long_desc=" Add_dependency full glibc Add_dependency full m4 +Add_dependency build gettext diff --git a/templates/busybox-initramfs/dotconfig b/templates/busybox-initramfs/dotconfig index 30f50ab651..eccda9449a 100644 --- a/templates/busybox-initramfs/dotconfig +++ b/templates/busybox-initramfs/dotconfig @@ -150,7 +150,7 @@ CONFIG_CHMOD=y CONFIG_CHOWN=y CONFIG_CHROOT=y # CONFIG_CKSUM is not set -# CONFIG_COMM is not set +CONFIG_COMM=y CONFIG_CP=y CONFIG_CUT=y CONFIG_DATE=y diff --git a/templates/coreutils/template b/templates/coreutils/template index cfcee72548..aca3ec6255 100644 --- a/templates/coreutils/template +++ b/templates/coreutils/template @@ -3,11 +3,7 @@ pkgname=coreutils version=7.6 distfiles="http://ftp.gnu.org/gnu/coreutils/$pkgname-$version.tar.gz" build_style=gnu_configure -configure_args="--enable-install-program=hostname --bindir=/bin - ac_cv_header_selinux_flask_h=no ac_cv_header_selinux_selinux_h=no - ac_cv_header_selinux_context_h=no ac_cv_search_setfilecon=no - ac_cv_header_sys_capability_h=no" -configure_env="PERL=/usr/bin/perl" +configure_args="--enable-install-program=hostname --bindir=/bin" short_desc="The GNU core utilities" maintainer="Juan RP " checksum=1d9bfe8b427ca5f8cffa0b462f861e4157c946fbeaf0884d273bbd6cab1c25d4 @@ -17,11 +13,11 @@ long_desc=" which are expected to exist on every operating system." essential=yes -base_chroot=yes Add_dependency run glibc Add_dependency full gmp Add_dependency full attr Add_dependency full acl +Add_dependency build perl post_install() { diff --git a/templates/cpio/template b/templates/cpio/template index eccb8558ac..b60d685c5d 100644 --- a/templates/cpio/template +++ b/templates/cpio/template @@ -13,6 +13,8 @@ long_desc=" on tapes." Add_dependency run glibc +Add_dependency build gettext +Add_dependency build texinfo post_install() { diff --git a/templates/cracklib/template b/templates/cracklib/template index 4e285f6cdf..2b7bc31bc6 100644 --- a/templates/cracklib/template +++ b/templates/cracklib/template @@ -12,6 +12,7 @@ long_desc=" against a dictionary file to find weak passwords (vulnerable to dictionary attacks)." +Add_dependency build gettext Add_dependency full glibc Add_dependency full zlib diff --git a/templates/dash/template b/templates/dash/template index 1fc5fff1e9..b65c71d217 100644 --- a/templates/dash/template +++ b/templates/dash/template @@ -18,7 +18,6 @@ long_desc=" dash in 2002." essential=yes -base_chroot=yes register_shell="/bin/sh" -Add_dependency run glibc +Add_dependency full glibc Add_dependency run coreutils diff --git a/templates/e2fsprogs/template b/templates/e2fsprogs/template index daccf64a42..2fabdc69d1 100644 --- a/templates/e2fsprogs/template +++ b/templates/e2fsprogs/template @@ -18,6 +18,7 @@ subpackages="devel libs" conf_files="/etc/mke2fs.conf" Add_dependency run glibc Add_dependency run e2fsprogs-libs +Add_dependency build gettext post_install() { diff --git a/templates/flex/template b/templates/flex/template index f6d403e8cc..cb946771e7 100644 --- a/templates/flex/template +++ b/templates/flex/template @@ -24,3 +24,4 @@ long_desc=" Add_dependency full glibc Add_dependency full bison Add_dependency full m4 +Add_dependency build gettext diff --git a/templates/gawk/template b/templates/gawk/template index e0215a0dfe..e890fbc167 100644 --- a/templates/gawk/template +++ b/templates/gawk/template @@ -10,6 +10,4 @@ checksum=f2a2f3b3053837c56fd42d801419e6a2aa89326c72308a87737da44191713a4d long_desc=" The GNU AWK utility, a pattern scanning and processing tool." -base_chroot=yes - Add_dependency run glibc diff --git a/templates/gettext/template b/templates/gettext/template index 2a9af6e614..ce90059c98 100644 --- a/templates/gettext/template +++ b/templates/gettext/template @@ -13,7 +13,6 @@ long_desc=" messages in different languages, as one of the steps to internationalisation (or i18n) of a utility." -base_chroot=yes subpackages="devel libs" Add_dependency run glibc Add_dependency build ncurses diff --git a/templates/glib/devel.template b/templates/glib/devel.template index df5527c0bf..eeda973248 100644 --- a/templates/glib/devel.template +++ b/templates/glib/devel.template @@ -15,7 +15,6 @@ do_install() mv ${SRCPKGDESTDIR}/usr/bin ${DESTDIR}/usr mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr mv ${SRCPKGDESTDIR}/usr/lib/glib-2.0 ${DESTDIR}/usr/lib - mv ${SRCPKGDESTDIR}/usr/lib/*.*a ${DESTDIR}/usr/lib mv ${SRCPKGDESTDIR}/usr/lib/*.so ${DESTDIR}/usr/lib mv ${SRCPKGDESTDIR}/usr/lib/pkgconfig ${DESTDIR}/usr/lib for f in man gtk-doc aclocal glib-2.0 gdb; do diff --git a/templates/glibc/template b/templates/glibc/template index a744425370..c6da1f985c 100644 --- a/templates/glibc/template +++ b/templates/glibc/template @@ -27,7 +27,6 @@ conf_files="/etc/rpc /etc/ld.so.conf /etc/nsswitch.conf" subpackages="devel locales" Add_dependency build gcc -Add_dependency build gawk Add_dependency build kernel-libc-headers Add_dependency run xbps-base-files Add_dependency run gcc-libgcc diff --git a/templates/gnutls/template b/templates/gnutls/template index 6f8f72f487..1d504170af 100644 --- a/templates/gnutls/template +++ b/templates/gnutls/template @@ -31,3 +31,5 @@ Add_dependency full readline Add_dependency full libtasn1 Add_dependency full libgcrypt Add_dependency full lzo +Add_dependency build gettext +Add_dependency build texinfo diff --git a/templates/gperf/template b/templates/gperf/template index 7e4fd9a406..3f0b769528 100644 --- a/templates/gperf/template +++ b/templates/gperf/template @@ -19,6 +19,7 @@ long_desc=" Add_dependency full glibc Add_dependency run gcc-libstdc++ +Add_dependency build texinfo post_install() { diff --git a/templates/grep/template b/templates/grep/template index 79f30ddee3..20730df663 100644 --- a/templates/grep/template +++ b/templates/grep/template @@ -14,7 +14,6 @@ long_desc=" full regexp matcher without necessarily having to look at every character. The result is typically many times faster than Unix grep or egrep." -base_chroot=yes - Add_dependency build texinfo +Add_dependency build gettext Add_dependency run glibc diff --git a/templates/groff/template b/templates/groff/template index 8feeee7c86..e87eb21ac9 100644 --- a/templates/groff/template +++ b/templates/groff/template @@ -21,3 +21,5 @@ Add_dependency full gcc-libstdc++ Add_dependency full bash Add_dependency full zlib Add_dependency full sed +Add_dependency build bison +Add_dependency build texinfo diff --git a/templates/klibc/template b/templates/klibc/template index 15fa661080..e9d2cc6a82 100644 --- a/templates/klibc/template +++ b/templates/klibc/template @@ -15,13 +15,13 @@ long_desc=" subpackages="devel utils" -Add_dependency build kernel-headers +Add_dependency build kernel Add_dependency build bison Add_dependency build perl -pre_configure() +pre_build() { - local kver="$(xbps-pkgdb -r / version kernel-headers)" + local kver="$(xbps-pkgdb version kernel-headers)" cd $wrksrc || return 1 ln -s /usr/src/kernel-headers-$kver linux diff --git a/templates/libgcrypt/template b/templates/libgcrypt/template index 1eb1dc0d17..8300c0725e 100644 --- a/templates/libgcrypt/template +++ b/templates/libgcrypt/template @@ -17,3 +17,4 @@ long_desc=" subpackages="devel" Add_dependency full glibc Add_dependency full libgpg-error +Add_dependency build texinfo diff --git a/templates/libgpg-error/template b/templates/libgpg-error/template index c3b0be54c3..d9f218b0f8 100644 --- a/templates/libgpg-error/template +++ b/templates/libgpg-error/template @@ -13,6 +13,7 @@ long_desc=" subpackages="devel" Add_dependency full glibc +Add_dependency build gettext post_install() { diff --git a/templates/libtasn1/template b/templates/libtasn1/template index b21ca44c1a..79e29937dc 100644 --- a/templates/libtasn1/template +++ b/templates/libtasn1/template @@ -20,3 +20,4 @@ long_desc=" subpackages="devel tools" Add_dependency full glibc +Add_dependency build texinfo diff --git a/templates/libtool/template b/templates/libtool/template index 6c91713613..57bf86fb66 100644 --- a/templates/libtool/template +++ b/templates/libtool/template @@ -12,6 +12,5 @@ long_desc=" the complexity of generating special library types (such as shared libraries) befind a consistent interface." -base_chroot=yes subpackages="ltdl" Add_dependency run glibc diff --git a/templates/man-db/template b/templates/man-db/template index 33ae740df7..db69c698aa 100644 --- a/templates/man-db/template +++ b/templates/man-db/template @@ -26,6 +26,7 @@ Add_dependency full less Add_dependency full gdbm Add_dependency full groff Add_dependency full grep +Add_dependency build gettext post_install() { diff --git a/templates/ncurses/template b/templates/ncurses/template index bd75340053..6dd17507b9 100644 --- a/templates/ncurses/template +++ b/templates/ncurses/template @@ -16,9 +16,7 @@ long_desc=" ecompiler infocmp, clear, tput, tset, and a termcap conversion tool captoinfo. Full manual pages are provided for the library and tools." -base_chroot=yes subpackages="base devel libs term" - Add_dependency run glibc Add_dependency run ncurses-libs diff --git a/templates/pam/template b/templates/pam/template index f2fa98c89c..95d5d3aa45 100644 --- a/templates/pam/template +++ b/templates/pam/template @@ -24,6 +24,7 @@ subpackages="devel" Add_dependency full glibc Add_dependency full cracklib Add_dependency build flex +Add_dependency build gettext post_install() { diff --git a/templates/perl/template b/templates/perl/template index 77cb983250..a05483300e 100644 --- a/templates/perl/template +++ b/templates/perl/template @@ -43,4 +43,6 @@ pre_configure() -Dsitelib=${p5_base}/site_perl/${p5_apiver} \ -Dvendorlib=${p5_base}/vendor_perl/${p5_apiver}" export configure_args="${args}" + + sed -i -e "s|'/bin/pwd'|'/usr/local/bin/pwd'|" lib/Cwd.pm } diff --git a/templates/pkg-config/template b/templates/pkg-config/template index e0fa385902..83fc13ceb3 100644 --- a/templates/pkg-config/template +++ b/templates/pkg-config/template @@ -1,8 +1,7 @@ # Template build file for 'pkg-config' pkgname=pkg-config version=0.23 -distfiles=" -http://pkgconfig.freedesktop.org/releases/$pkgname-$version.tar.gz" +distfiles="http://pkgconfig.freedesktop.org/releases/$pkgname-$version.tar.gz" build_style=gnu_configure configure_args="--disable-threads" short_desc="System for managing library compile/link flags" diff --git a/templates/proplib/template b/templates/proplib/template index 186d22f7b0..b3cde44c45 100644 --- a/templates/proplib/template +++ b/templates/proplib/template @@ -22,7 +22,5 @@ long_desc=" with the exception that NetBSD specific code has been removed and it has been converted to be built through the GNU autotools." -base_chroot=yes subpackages="devel" - Add_dependency run glibc diff --git a/templates/psmisc/template b/templates/psmisc/template index a93a426cbe..5052f9932c 100644 --- a/templates/psmisc/template +++ b/templates/psmisc/template @@ -11,4 +11,5 @@ long_desc=" the proc filesystem. We're not about changing the world, but providing the system administratror with some help in common tasks." +Add_dependency build gettext Add_dependency run glibc diff --git a/templates/readline/template b/templates/readline/template index a4dcb4bb11..0bb621cabd 100644 --- a/templates/readline/template +++ b/templates/readline/template @@ -24,6 +24,7 @@ subpackages="devel" Add_dependency full glibc Add_dependency build ncurses Add_dependency run ncurses-libs +Add_dependency build texinfo pre_configure() { diff --git a/templates/sed/template b/templates/sed/template index 244f44de7f..b12e097138 100644 --- a/templates/sed/template +++ b/templates/sed/template @@ -3,9 +3,7 @@ pkgname=sed version=4.2.1 distfiles="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$version.tar.gz" build_style=gnu_configure -configure_args="--bindir=/bin - ac_cv_header_selinux_flask_h=no ac_cv_header_selinux_selinux_h=no - ac_cv_header_selinux_context_h=no ac_cv_search_setfilecon=no" +configure_args="--bindir=/bin" short_desc="The GNU stream editor" maintainer="Juan RP " checksum=8773541ce097fdc4c5b9e7da12a82dffbb30cd91f7bc169f52f05f93b7fc3060 @@ -13,6 +11,5 @@ long_desc=" Sed, the GNU Stream Editor, copies the named files (standard input default) to the standard output, edited according to a script of commands." -base_chroot=yes Add_dependency run glibc Add_dependency full acl diff --git a/templates/shadow/template b/templates/shadow/template index 51053b931c..60e0821711 100644 --- a/templates/shadow/template +++ b/templates/shadow/template @@ -21,6 +21,7 @@ conf_files="/etc/pam.d/usermod /etc/pam.d/userdel /etc/pam.d/useradd Add_dependency full glibc Add_dependency full pam +Add_dependency build gettext pre_build() { diff --git a/templates/texinfo/template b/templates/texinfo/template index 6dcf2fd3f0..a393c68a51 100644 --- a/templates/texinfo/template +++ b/templates/texinfo/template @@ -14,7 +14,7 @@ long_desc=" on Brian Reid's Scribe and other formatting languages of the time. It is used by many non-GNU projects as well." -base_chroot=yes +Add_dependency build gettext Add_dependency run glibc Add_dependency run ncurses-libs Add_dependency run findutils diff --git a/templates/util-linux-ng/template b/templates/util-linux-ng/template index 0e911c281f..70360793d8 100644 --- a/templates/util-linux-ng/template +++ b/templates/util-linux-ng/template @@ -22,6 +22,7 @@ Add_dependency full zlib Add_dependency full libblkid Add_dependency run ncurses-libs Add_dependency build pkg-config +Add_dependency build gettext post_configure() { diff --git a/templates/wget/template b/templates/wget/template index 6b53253f75..efc1faa4a8 100644 --- a/templates/wget/template +++ b/templates/wget/template @@ -32,6 +32,8 @@ long_desc=" conf_files="/etc/wgetrc" Add_dependency run glibc Add_dependency full openssl +Add_dependency build gettext +Add_dependency build texinfo post_build() { diff --git a/templates/which/template b/templates/which/template index 0603749db7..f974cf1d32 100644 --- a/templates/which/template +++ b/templates/which/template @@ -12,3 +12,4 @@ long_desc=" Add_dependency full glibc Add_dependency full bash +Add_dependency build texinfo diff --git a/templates/xbps-base-chroot/template b/templates/xbps-base-chroot/template index f04ab7ca49..105ee260c2 100644 --- a/templates/xbps-base-chroot/template +++ b/templates/xbps-base-chroot/template @@ -1,6 +1,6 @@ # Template file for 'xbps-base-chroot' pkgname=xbps-base-chroot -version=0.10 +version=0.11 build_style=meta-template short_desc="xbps base packages for the chroot target" maintainer="Juan RP " @@ -12,26 +12,15 @@ noarch=yes base_chroot=yes Add_dependency full xbps-base-files -Add_dependency full ncurses -Add_dependency full gettext -Add_dependency full texinfo -Add_dependency full gcc -Add_dependency full glibc -Add_dependency full dash Add_dependency full patch -Add_dependency full gawk -Add_dependency full bash -Add_dependency full coreutils -Add_dependency full tar -Add_dependency full grep -Add_dependency full findutils -Add_dependency full sed Add_dependency full make Add_dependency full diffutils Add_dependency full file -Add_dependency run zlib-devel -Add_dependency run bzip2-devel -Add_dependency run ncurses-devel +Add_dependency full tar +Add_dependency full findutils +Add_dependency full gcc +Add_dependency full glibc +Add_dependency full busybox-initramfs Add_dependency run gcc-c++ Add_dependency run gcc-libstdc++-devel Add_dependency run glibc-devel diff --git a/templates/xbps-base-system/template b/templates/xbps-base-system/template index 3c55663c87..8ef0710126 100644 --- a/templates/xbps-base-system/template +++ b/templates/xbps-base-system/template @@ -1,6 +1,6 @@ # Template file for 'xbps-base-chroot' pkgname=xbps-base-system -version=0.20 +version=0.21 build_style=meta-template short_desc="xbps base system packages" maintainer="Juan RP " @@ -11,6 +11,12 @@ long_desc=" noarch=yes Add_dependency full xbps-base-files +Add_dependency full dash +Add_dependency full bash +Add_dependency full coreutils +Add_dependency full grep +Add_dependency full findutils +Add_dependency full sed Add_dependency full texinfo Add_dependency full coreutils Add_dependency full OpenRC diff --git a/xbps-src/etc/xbps-src.conf.in b/xbps-src/etc/xbps-src.conf.in index b79631b170..9e9d27fd0c 100644 --- a/xbps-src/etc/xbps-src.conf.in +++ b/xbps-src/etc/xbps-src.conf.in @@ -51,11 +51,6 @@ XBPS_CXXFLAGS="$XBPS_CFLAGS" # #XBPS_MAKEJOBS=4 -# -# Fetch command to download files. -# -XBPS_FETCH_CMD=wget - # # Compression program used to build the binary packages. # Possible values: gzip, bzip2 or xz. Default xz. diff --git a/xbps-src/shutils/builddep_funcs.sh b/xbps-src/shutils/builddep_funcs.sh index 98b1b89e93..639f8bda85 100644 --- a/xbps-src/shutils/builddep_funcs.sh +++ b/xbps-src/shutils/builddep_funcs.sh @@ -32,15 +32,15 @@ install_pkg_deps() { local curpkg="$1" - local curpkgname=$(xbps-pkgdb getpkgname $1) - local saved_prevpkg=$(xbps-pkgdb getpkgname $2) + local curpkgname=$(${XBPS_PKGDB_CMD} getpkgname $1) + local saved_prevpkg=$(${XBPS_PKGDB_CMD} getpkgname $2) local j jver jname reqver [ -z "$curpkg" ] && return 1 if [ -n "$prev_pkg" ]; then curpkg=$prev_pkg - curpkgname=$(xbps-pkgdb getpkgname ${curpkg}) + curpkgname=$(${XBPS_PKGDB_CMD} getpkgname ${curpkg}) fi msg_normal "Installing $saved_prevpkg dependency: $curpkgname." @@ -50,9 +50,9 @@ install_pkg_deps() if [ $? -eq 0 ]; then msg_normal "Dependency $curpkgname requires:" for j in ${build_depends}; do - jname=$(xbps-pkgdb getpkgname ${j}) - jver=$($XBPS_REGPKGDB_CMD version ${jname}) - reqver=$(xbps-pkgdb getpkgversion ${j}) + jname=$(${XBPS_PKGDB_CMD} getpkgname ${j}) + jver=$($XBPS_PKGDB_CMD version ${jname}) + reqver=$(${XBPS_PKGDB_CMD} getpkgversion ${j}) check_installed_pkg $j if [ $? -eq 0 ]; then echo " $jname >= $reqver: found $jname-$jver." @@ -88,7 +88,7 @@ install_pkg_deps() install_dependencies_pkg() { local pkg="$1" - local lpkgname=$(xbps-pkgdb getpkgname ${pkg}) + local lpkgname=$(${XBPS_PKGDB_CMD} getpkgname ${pkg}) local i ipkgname iversion reqvers notinstalled_deps lver [ -z "$pkg" ] && return 1 @@ -103,9 +103,9 @@ install_dependencies_pkg() msg_normal "Required build dependencies for $pkgname-$lver... " for i in ${build_depends}; do - ipkgname=$(xbps-pkgdb getpkgname ${i}) - iversion=$($XBPS_REGPKGDB_CMD version $ipkgname) - reqvers=$(xbps-pkgdb getpkgversion ${i}) + ipkgname=$(${XBPS_PKGDB_CMD} getpkgname ${i}) + iversion=$($XBPS_PKGDB_CMD version $ipkgname) + reqvers=$(${XBPS_PKGDB_CMD} getpkgversion ${i}) check_installed_pkg $i if [ $? -eq 0 ]; then echo " $ipkgname >= $reqvers: found $ipkgname-$iversion." @@ -122,7 +122,7 @@ install_dependencies_pkg() check_installed_pkg $i [ $? -eq 0 ] && continue - ipkgname=$(xbps-pkgdb getpkgname ${i}) + ipkgname=$(${XBPS_PKGDB_CMD} getpkgname ${i}) run_template $ipkgname check_build_depends_pkg if [ $? -eq 1 ]; then @@ -137,7 +137,7 @@ install_dependencies_pkg() install_builddeps_required_pkg() { local pkg="$1" - local pkgname=$(xbps-pkgdb getpkgname ${pkg}) + local pkgname=$(${XBPS_PKGDB_CMD} getpkgname ${pkg}) local dep depname [ -z "$pkg" ] && return 1 @@ -148,7 +148,7 @@ install_builddeps_required_pkg() check_installed_pkg $dep if [ $? -ne 0 ]; then msg_normal "Installing $pkgname dependency: $dep." - depname=$(xbps-pkgdb getpkgname ${dep}) + depname=$(${XBPS_PKGDB_CMD} getpkgname ${dep}) install_pkg $depname fi done @@ -165,11 +165,11 @@ check_installed_pkg() [ -z "$pkg" ] && return 2 - pkgname=$(xbps-pkgdb getpkgname $pkg) - reqver=$(xbps-pkgdb getpkgversion $pkg) + pkgname=$(${XBPS_PKGDB_CMD} getpkgname $pkg) + reqver=$(${XBPS_PKGDB_CMD} getpkgversion $pkg) run_template $pkgname - iver="$($XBPS_REGPKGDB_CMD version $pkgname)" + iver="$($XBPS_PKGDB_CMD version $pkgname)" if [ -n "$iver" ]; then xbps-cmpver $pkgname-$iver $pkgname-$reqver [ $? -eq 0 -o $? -eq 1 ] && return 0 diff --git a/xbps-src/shutils/chroot.sh b/xbps-src/shutils/chroot.sh index 164f96fa5c..3e2e641d05 100644 --- a/xbps-src/shutils/chroot.sh +++ b/xbps-src/shutils/chroot.sh @@ -86,12 +86,18 @@ ff02::2 ip6-allrouters ff02::3 ip6-allhosts _EOF - # Use OpenDNS servers. - cat > $XBPS_MASTERDIR/etc/resolv.conf <<_EOF -nameserver 208.67.222.222 -nameserver 208.67.220.220 -_EOF + cp -f /etc/resolv.conf $XBPS_MASTERDIR/etc + # + # Copy host shell, bash is prefered to avoid breakage in + # GNU autoconf scripts! + # + mkdir -p $XBPS_MASTERDIR/bin + if [ -x /bin/bash ]; then + cp -f /bin/bash $XBPS_MASTERDIR/bin/sh + elif [ -x /bin/sh ]; then + cp -f /bin/sh $XBPS_MASTERDIR/bin/sh + fi touch $XBPS_MASTERDIR/.xbps_perms_done } @@ -104,19 +110,37 @@ rebuild_ldso_cache() echo " done." } +create_busybox_links() +{ + local busyboxdir=$XBPS_MASTERDIR/usr/lib/busybox-initramfs + local lbindir=$XBPS_MASTERDIR/usr/local/bin + + [ -f $XBPS_MASTERDIR/.busybox_done ] && return 0 + + [ ! -d ${lbindir} ] && mkdir -p ${lbindir} + + # Create other symlinks in /usr/local/bin + for f in $(find ${busyboxdir} -type l); do + cd ${lbindir} || return 1 + [ "$(basename $f)" = "sh" ] && continue + ln -s ../../lib/busybox-initramfs/bin/busybox $(basename $f) + done + + touch -f $XBPS_MASTERDIR/.busybox_done +} + install_xbps_utils() { local needed fetch_cmd local xbps_prefix=$XBPS_MASTERDIR/usr/local for f in bin cmpver digest pkgdb; do - if [ ! -x $xbps_prefix/sbin/xbps-${f} ]; then + if [ ! -x $xbps_prefix/sbin/xbps-${f}.static ]; then needed=yes fi done if [ -n "$needed" ]; then - cd ${XBPS_MASTERDIR}/bin && ln -s dash sh echo "=> Installing the required XBPS utils." chroot $XBPS_MASTERDIR sh -c \ "echo /usr/local/lib > /etc/ld.so.conf" @@ -128,7 +152,7 @@ install_xbps_utils() cp -f $fetch_cmd $xbps_prefix/sbin for f in bin cmpver digest pkgdb repo; do cp -f $XBPS_INSTALLDIR/sbin/xbps-$f.static \ - $xbps_prefix/sbin/xbps-$f + $xbps_prefix/sbin/ done cp -f $XBPS_INSTALLDIR/sbin/xbps-src $xbps_prefix/sbin if [ -z $XBPS_INSTALLDIR ]; then @@ -146,7 +170,7 @@ xbps_chroot_handler() local action="$1" local pkg="$2" local only_destdir="$3" - + local path="/usr/local/sbin:/bin::/sbin:/usr/bin:/usr/sbin:/usr/local/bin" [ -z "$action" -o -z "$pkg" ] && return 1 [ "$action" != "configure" -a "$action" != "build" -a \ @@ -154,6 +178,7 @@ xbps_chroot_handler() mount_chroot_fs install_xbps_utils + create_busybox_links if [ ! -f $XBPS_MASTERDIR/.xbps_perms_done ]; then echo -n "==> Preparing chroot on $XBPS_MASTERDIR... " @@ -162,12 +187,14 @@ xbps_chroot_handler() fi if [ "$action" = "chroot" ]; then - env in_chroot=yes LANG=C chroot $XBPS_MASTERDIR /bin/bash + env in_chroot=yes LANG=C PATH=$path \ + chroot $XBPS_MASTERDIR /bin/sh else [ -n "$only_destdir" ] && \ local lenv="install_destdir_target=yes" - env in_chroot=yes LANG=C ${lenv} chroot $XBPS_MASTERDIR \ - xbps-src $action $pkg + env in_chroot=yes LANG=C PATH=$path \ + ${lenv} chroot $XBPS_MASTERDIR \ + /usr/local/sbin/xbps-src $action $pkg fi msg_normal "Exiting from the chroot on $XBPS_MASTERDIR." umount_chroot_fs @@ -250,10 +277,10 @@ umount_chroot_fs() [ -n "$base_chroot" ] && return 0 . $XBPS_SHUTILSDIR/builddep_funcs.sh -check_installed_pkg xbps-base-chroot-0.1 +check_installed_pkg xbps-base-chroot-0.11 if [ $? -ne 0 ]; then echo "The '$pkgname' package requires to be installed in a chroot." - echo "Please install the 'xbps-base-chroot' package and try again." + echo "Please install 'xbps-base-chroot>=0.11' and try again." exit 1 fi diff --git a/xbps-src/shutils/fetch_funcs.sh b/xbps-src/shutils/fetch_funcs.sh index 0b16c227e9..36aed944a6 100644 --- a/xbps-src/shutils/fetch_funcs.sh +++ b/xbps-src/shutils/fetch_funcs.sh @@ -34,7 +34,7 @@ verify_sha256_cksum() [ -z "$file" -o -z "$cksum" ] && return 1 - filesum=$(xbps-digest.static $XBPS_SRCDISTDIR/$file) + filesum=$(${XBPS_DIGEST_CMD} $XBPS_SRCDISTDIR/$file) if [ "$origsum" != "$filesum" ]; then msg_error "SHA256 checksum doesn't match for $file." fi @@ -47,7 +47,7 @@ fetch_update_cksum() local tmpl="$XBPS_TEMPLATESDIR/$pkgname/template" local upcmd=$(basename $XBPS_SRCDISTDIR/$1) - sed -i -e "s|checksum.*|checksum=$(xbps-digest.static ${upcmd})|" $tmpl + sed -i -e "s|checksum.*|checksum=$(${XBPS_DIGEST_CMD} ${upcmd})|" $tmpl return $? } diff --git a/xbps-src/shutils/metadata.sh b/xbps-src/shutils/metadata.sh index ce61508504..c0cfd375e7 100644 --- a/xbps-src/shutils/metadata.sh +++ b/xbps-src/shutils/metadata.sh @@ -213,7 +213,7 @@ xbps_write_metadata_pkg_real() echo "file" >> $TMPFPLIST echo "$j" >> $TMPFPLIST echo "sha256" >> $TMPFPLIST - echo "$(xbps-digest.static $f)" \ + echo "$(${XBPS_DIGEST_CMD} $f)" \ >> $TMPFPLIST echo "" >> $TMPFPLIST done @@ -244,7 +244,7 @@ xbps_write_metadata_pkg_real() echo "file" >> $TMPFPLIST echo "$f" >> $TMPFPLIST echo "sha256" >> $TMPFPLIST - echo "$(xbps-digest.static ${i})" \ + echo "$(${XBPS_DIGEST_CMD} ${i})" \ >> $TMPFPLIST echo "" >> $TMPFPLIST done @@ -258,6 +258,8 @@ xbps_write_metadata_pkg_real() # Write the props.plist file. local TMPFPROPS=$(mktemp -t fprops.XXXXXXXXXX) || exit 1 + local instsize=$(du -sk ${DESTDIR}|awk '{print $1}') + cat > $TMPFPROPS <<_EOF @@ -270,7 +272,7 @@ xbps_write_metadata_pkg_real() architecture $arch installed_size -$(du -sb ${DESTDIR}|awk '{print $1}') +$(($instsize * 1024)) maintainer $(echo $maintainer|sed -e 's|<|[|g;s|>|]|g') short_desc @@ -345,8 +347,8 @@ _EOF mv -f $TMPFPLIST ${DESTDIR}/files.plist mv -f $TMPFPROPS ${DESTDIR}/props.plist - $XBPS_REGPKGDB_CMD sanitize-plist ${DESTDIR}/files.plist - $XBPS_REGPKGDB_CMD sanitize-plist ${DESTDIR}/props.plist + $XBPS_PKGDB_CMD sanitize-plist ${DESTDIR}/files.plist + $XBPS_PKGDB_CMD sanitize-plist ${DESTDIR}/props.plist chmod 644 ${DESTDIR}/files.plist ${DESTDIR}/props.plist [ -f $metadir/flist ] && chmod 644 $metadir/flist diff --git a/xbps-src/shutils/pkgtarget_funcs.sh b/xbps-src/shutils/pkgtarget_funcs.sh index ddecca25e2..1a4b3a566f 100644 --- a/xbps-src/shutils/pkgtarget_funcs.sh +++ b/xbps-src/shutils/pkgtarget_funcs.sh @@ -133,7 +133,7 @@ list_pkg_files() [ -z $pkg ] && msg_error "unexistent package, aborting." - ver=$($XBPS_REGPKGDB_CMD version $pkg) + ver=$($XBPS_PKGDB_CMD version $pkg) [ -z "$ver" ] && msg_error "$pkg is not installed." cat $XBPS_PKGMETADIR/$pkg/flist @@ -160,7 +160,7 @@ remove_pkg() fi done - ver=$($XBPS_REGPKGDB_CMD version $pkg) + ver=$($XBPS_PKGDB_CMD version $pkg) [ -z "$ver" ] && msg_error "$pkg is not installed." . $XBPS_SHUTILSDIR/stow_funcs.sh diff --git a/xbps-src/shutils/stow_funcs.sh b/xbps-src/shutils/stow_funcs.sh index 632bf21333..6dab3ea831 100644 --- a/xbps-src/shutils/stow_funcs.sh +++ b/xbps-src/shutils/stow_funcs.sh @@ -106,7 +106,7 @@ stow_pkg_real() else lver="${version}" fi - $XBPS_REGPKGDB_CMD register $pkg $lver "$short_desc" || exit 1 + $XBPS_PKGDB_CMD register $pkg $lver "$short_desc" || exit 1 return $? } @@ -127,7 +127,7 @@ unstow_pkg() run_template $pkg - ver=$($XBPS_REGPKGDB_CMD version $pkg) + ver=$($XBPS_PKGDB_CMD version $pkg) if [ -z "$ver" ]; then msg_error "$pkg is not installed." fi @@ -165,6 +165,6 @@ unstow_pkg() rm -rf $XBPS_PKGMETADIR/$pkg # Unregister pkg from plist file. - $XBPS_REGPKGDB_CMD unregister $pkg $ver + $XBPS_PKGDB_CMD unregister $pkg $ver return $? } diff --git a/xbps-src/xbps-src.sh.in b/xbps-src/xbps-src.sh.in index 41e5513c08..3a48b3469f 100644 --- a/xbps-src/xbps-src.sh.in +++ b/xbps-src/xbps-src.sh.in @@ -107,8 +107,11 @@ set_defvars() [ ! -d "$val" ] && msg_error "cannot find $i, aborting." done - XBPS_REGPKGDB_CMD="xbps-pkgdb -r $XBPS_MASTERDIR" - XBPS_BIN_CMD="xbps-bin -r $XBPS_MASTERDIR" + export XBPS_PKGDB_CMD="xbps-pkgdb.static -r $XBPS_MASTERDIR" + export XBPS_BIN_CMD="xbps-bin.static -r $XBPS_MASTERDIR" + export XBPS_DIGEST_CMD="xbps-digest.static" + export XBPS_CMPVER_CMD="xbps-cmpver.static" + export XBPS_FETCH_CMD="xbps-fetch.static" } # @@ -148,7 +151,7 @@ check_config_vars() fi done - export PATH="$PATH:@@XBPS_INSTALL_PREFIX@@/sbin" + export PATH="@@XBPS_INSTALL_PREFIX@@/sbin:$PATH" } # @@ -217,7 +220,7 @@ build-pkg) . $XBPS_SHUTILSDIR/tmpl_funcs.sh if [ "$2" = "all" ]; then for f in $($XBPS_BIN_CMD list|awk '{print $1}'); do - pkg=$(xbps-pkgdb getpkgname $f) + pkg=$(${XBPS_PKGDB_CMD} getpkgname $f) setup_tmpl ${pkg} if [ "$pkg" = "$sourcepkg" ]; then xbps_make_binpkg ${pkg}