Commit Graph

290 Commits

Author SHA1 Message Date
Juan RP
ac897c8383 libxbps: move remote repo pkg-index sync code into its own file.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091027034000-rsg33sjonqsu0d5t
2009-10-27 04:40:00 +01:00
Juan RP
4acda249d9 README: mention that openssl is required for https support.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091027005634-u3j7i5vbldgrkjhu
2009-10-27 01:56:34 +01:00
Juan RP
7aebea684b Implemented support for working with remote repositories.
libfetch from NetBSD's pkgsrc has been imported into lib/fetch, but
the objects are embedded into libxbps. Only a public function to fetch
files has been implemented: xbps_fetch_file().

The library now is built with -fvisibility=hidden by default, and
exported symbols are the ones that use the SYMEXPORT macro.

The code works well enough, but will need many more cleanups.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091027004600-0lq9aao67lisbzxv
2009-10-27 01:46:00 +01:00
Juan RP
6a855c0272 xbps_find_orphan_packages: report return value as errno in an error path.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091023120316-om71k2rnmk4ruzh1
2009-10-23 14:03:16 +02:00
Juan RP
b689725270 xbps-bin: use a single point to cleanup resources.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091023120154-wj4937kmu6ryacpk
2009-10-23 14:01:54 +02:00
Juan RP
ca39d1667e xbps-bin: use a signal handler for SIGINT, SIGTERM and SIGQUIT to
free resources used by libxbps.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091023092025-gav4w23f1oc7mgjy
2009-10-23 11:20:25 +02:00
Juan RP
236b86ae50 xbps_check_is_installed_pkg: fix a leak in error paths reported by valgrind.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091023091157-h3tlqw2nz67m72ep
2009-10-23 11:11:57 +02:00
Juan RP
1e792e62f8 xbps-bin: use HN_B and HN_DECIMAL when using humanize_number for a more
detailed output.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091023064559-b91xhoveq6qcpfpp
2009-10-23 08:45:59 +02:00
Juan RP
b2197be315 Do not use private sha256.h header file in the public exported
API header file (xbps_api.h).

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091022124921-nvy2x07ibxjqtt50
2009-10-22 14:49:21 +02:00
Juan RP
534f7f0306 vars.mk: _BSD_SOURCE does not need to be defined.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091022124833-g1z0iznkjw4nayjs
2009-10-22 14:48:33 +02:00
Juan RP
96c501b5cc xbps-bin: while updating a package that needs a new dependent package
the automatic-install object wasn't set correctly, fix this.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091022123221-46rya21xjy1mp8nb
2009-10-22 14:32:21 +02:00
Juan RP
d2dc018fcc .bzrignore: add static bins.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091022093009-rntjfl2vd4czvrcs
2009-10-22 11:30:09 +02:00
Juan RP
03c7b26874 Fix typo in previous.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091021162718-n24n1yf7144rmqrz
2009-10-21 18:27:18 +02:00
Juan RP
f99a154d7f Improved unpacking package files, fixing bugs in configuration file
handling.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091021161617-c9d2jyhxlwlid4e6
2009-10-21 18:16:17 +02:00
Juan RP
7bfb24dad6 doc/BINPKG_INFO: mention that binary packages might be compressed in
any format supported by libarchive, not just bzip2.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091020122551-lcr71azfscnow4x4
2009-10-20 14:25:51 +02:00
Juan RP
e9ef83517e vars.mk: build bins with -fstack-protector-all and -Wstack-protector.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091020074537-j84wcoa5mdtt13g2
2009-10-20 09:45:37 +02:00
Juan RP
bc3eeeec58 xbps-pkgdb: always set rootdir as an empty string, otherwise if -r
is not specified it will fail to get the regpkgdb plist file.

Bug found by pancake.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091019214947-cv57nebkpo48spce
2009-10-19 23:49:47 +02:00
Juan RP
fc659323a9 prog.mk: add uninstall target.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091018153932-2igo4pum7hhjil1l
2009-10-18 17:39:32 +02:00
Juan RP
c72f3a1a3c Remove xbps-src and its associated code. This is required for the
upcoming 0.3 version.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091018091539-4f7ynscyvsqt3st4
2009-10-18 11:15:39 +02:00
Juan RP
fdc561dfb2 xbps-{bin,repo,pkgdb}: added -V flag that prints the current XBPS
release version as defined in xbps_api.h.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091018084204-1xzyptqkjm5dwfjc
2009-10-18 10:42:04 +02:00
Juan RP
866e758dd2 xbps_api.h: aded XBPS_RELVER definition that returns the current
version of xbps (utils and libraries).

Will be used by xbps-src in the future to require a minimal version.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091018082352-7m4nd0psac5vplg8
2009-10-18 10:23:52 +02:00
Juan RP
af58fd7c8e shutils: reorganize stuff for $build_style, add "python-module" style.
If build_style=python-module, $XBPS_HELPERSDIR/python-module.sh will
run the do_install function.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091018071843-f3nv3rnhfzhngukp
2009-10-18 09:18:43 +02:00
Juan RP
ba1c8971a5 Fix "autoupdate" target when no new packages are available.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091017041820-tj61sfbw5nz50ioh
2009-10-17 06:18:20 +02:00
Juan RP
22c40a2f91 Don't propagate $replaces value to subpkgs, use its own if defined.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091017031254-6zb0zhymwdhcu4na
2009-10-17 05:12:54 +02:00
Juan RP
3ddf276437 Fixed bug #453422: "xbps shouldn't depend on LZMA utils"
Do not link to libzmadec, rather to liblzma provided by xz.
Pointed by ojab in the bug, thanks!

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091017030101-1cw1b11l923hy8cw
2009-10-17 05:01:01 +02:00
Juan RP
058b882037 Fix previous, so that only tries to replace packages if they
are installed! heh

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091017025959-4k8ciftjglkbao91
2009-10-17 04:59:59 +02:00
Juan RP
cacb34147a Added support to replace packages with another one. Package metadata
uses an array of strings that lists the packages that should be
removed before new package can be installed.

In the build templates one can use: replaces="foo foo-blah foo-libs".

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091017022643-rdyrp9kvmx3m0p0h
2009-10-17 04:26:43 +02:00
Juan RP
4ef0fbcada Multiple changes to xbps-src and shutils:
* Added XBPS_FETCH_CMD to xbps-src.conf, this will be used to fetch
  distfiles. Please note that it will be copied to the chroot, so
  it should be statically linked or with only libc required.

* Removed libtool_func.sh and associated vars, it's unneeded currently.

* Added keep_empty_dirs, keep_libtool_archives and nostrip. By default
  all empty dirs and libtool archives are removed, and executables and
  libraries stripped, respectively. One can use set the var in a build
  template to change the behaviour.

* Explain in README what are the requirements to build XBPS.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091017005836-uifiof32ndy0wmd8
2009-10-17 02:58:36 +02:00
Juan RP
f7689695d1 xbps-bin/install.c: use only a function for install/update/autoupdate.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016153732-gbcr30fahvveu2u9
2009-10-16 17:37:32 +02:00
Juan RP
cb1f10d415 xbps-bin: don't initialize repolist data unless we want to update.
xbps_find_new_pkg: always initialize repolist data.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016150435-wpjfd453hpwr5k89
2009-10-16 17:04:35 +02:00
Juan RP
becfac0c08 vars.mk: add DEBUG option.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016141419-ngopy0o6sv8uuxab
2009-10-16 16:14:19 +02:00
Juan RP
651a4e6254 xbps-bin/xbps_install_pkg(): only sort pkg deps in update mode.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016135513-w4yc413l3i1pwdkm
2009-10-16 15:55:13 +02:00
Juan RP
a60fde85a5 xbps_find_new_packages(): do not treat missing packages in repo,
or packages with less than or equal version installed as errors.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016134654-14a5x7b6ra9a632s
2009-10-16 15:46:54 +02:00
Juan RP
e1f2a8b7bd xbps-bin: multiple fixes to update packages.
* Fix 'autoupdate' target to look for new packages in ALL repos, not
  just the first one that has the package.
* Fix 'update' target to work correctly.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016133157-asvkv5jb6i9q2ibe
2009-10-16 15:31:57 +02:00
Juan RP
d771383442 xbps_requiredby_pkg_add: ignore existing entries.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016113656-386rsnozjjlz500k
2009-10-16 13:36:56 +02:00
Juan RP
865b06be5d Build xbps-{bin,cmpver,digest,pkgdb,repo} as static, and install them
as foo.static.

Updated README to note the new requirements for it. It will be used
to reduce the number of dependencies when building packages in
the chroot.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091015222234-360i67zychjge3nh
2009-10-16 00:22:34 +02:00
Juan RP
6798be2f58 Makefile: remove $(SHAREDIR) in uninstall target.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091015222115-gosfgymdsk4gswk0
2009-10-16 00:21:15 +02:00
Juan RP
cf04a48a1d Remove support for "keep_dirs", it won't be used.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091015142937-sbf72osvlulzq7d6
2009-10-15 16:29:37 +02:00
Juan RP
c069ff4d49 shutils/install_funcs.sh: always remove unwanted perl installed files,
even in packages that use do_install(). Wrap a long line.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091015142511-d2m9zfpd18um4bm1
2009-10-15 16:25:11 +02:00
Juan RP
1febd85f42 xbps-pkgdb, shutils: use red/bold, red/yellow and bold for
msg_error, msg_warn and msg_normal respectively.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091015141731-9ci2bnvslqe5gq7j
2009-10-15 16:17:31 +02:00
Juan RP
a344468556 shutils: remove support for $configure_shell.
There is not much gain supporting this...

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091015141609-0g7h8y18aw1i9arx
2009-10-15 16:16:09 +02:00
Juan RP
d75b195143 shutils/builddep_func.sh: use msg_* funcs.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091015140610-nps2cphr0zvxvltg
2009-10-15 16:06:10 +02:00
Juan RP
e056e23be1 shutils: improve how the patches are applied.
Now all patches must be placed in PATCHESDIR (templatesdir/$pkgname/patches)
and must be in -p0 format. If other args are required, a same file with
.args extension should be created with specific args inside of it.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091015140224-x5n026mdhwb4pvyq
2009-10-15 16:02:24 +02:00
Juan RP
9296d25811 shutils: return proper error in {do,pre,post}_* stage funcs and use msg_error.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091012220713-k3j00b7x3jk5s3we
2009-10-13 00:07:13 +02:00
Juan RP
cf7b3caebe shutils: cross-compilation.sh is in XBPS_SHUTILSDIR not XBPS_HELPERSDIR.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091012203507-oqqkp2izfsl570gp
2009-10-12 22:35:07 +02:00
Juan RP
c6d3868b8b shutils: remove tmpl_func.sh, moved to the xbps-templates repo.
xbps-src: added XBPS_COMMONVARSDIR that sources all .sh files in
	  setup_tmpl(), this replaces tmpl_funcs.sh.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091012203056-rtay2drhrwak4ldk
2009-10-12 22:30:56 +02:00
Juan RP
8918861000 shutils: added "nofetch" variable to be used in build templates.
When it's set, a custom do_fetch() function must be used to fetch
sources. $distfiles and $checksum will be ignored in that case.
This makes it able to fetch sources from git, svn, bzr, etc.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091012102321-zqp4r783uo1s4sek
2009-10-12 12:23:21 +02:00
Juan RP
06d451e557 Remove 'automatic' flag while installing via xbps-src, it's not very
useful and won't be implemented.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091010155336-uyjgohik8y1y21bz
2009-10-10 17:53:36 +02:00
Juan RP
dd2baebdec Fix bug #447944: xbps build failure (gcc 4.4.1)
unsigned int and size_t do not match in size in x86_64, so use
unsigned int in functions expecting this type.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091010141337-vfoiay5nx8edl0ux
2009-10-10 16:13:37 +02:00
Juan RP
c0959e503f shutils/install_funcs.sh: fix inverted test for $libtool_no_delete_archives.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091010081719-f6mx907ma5rtitux
2009-10-10 10:17:19 +02:00