Commit Graph

21 Commits

Author SHA1 Message Date
Duncan Overbruck
59bcbddcdb
lib/package_script.c: xbps_pkg_exec_script: remove useless copy and free 2021-06-26 18:41:37 +02:00
Duncan Overbruck
44cd938115
Revert "Use shared LICENSE file for all xbps code."
This reverts commit be7d8cfaf1.

This commit missed some previous copyrights mentioned,
in general I think its better to have this per-file to
follow who wrote what and when.
2020-04-29 14:12:10 +02:00
Juan RP
be7d8cfaf1
Use shared LICENSE file for all xbps code. 2020-04-24 11:44:19 +02:00
Juan RP
6010a24de6 libxbps: ABI/API break due to xbps_pkg{,pattern}_name changes.
The funcs xbps_pkg_name() and xbps_pkgpattern_name() were
using malloc(3) to return the result, until now.

They now have been changed to not allocate the result
via malloc, the caller is responsible to provide a buffer
at least of XBPS_NAME_SIZE (64).

If for whatever reason the pkgname can't be guessed,
returns false. This should avoid lots of small allocs
around libxbps.

New functions have the following prototype:

bool xbps_pkg_name(char *dst, size_t len, const char *pkg)
bool xbps_pkgpattern_name(char *dst, size_t len, const char *pkg)

as suggested by @duncaen.
2020-02-08 19:49:57 +01:00
Juan RP
b9b6f43300 package_script.c: fix runtime with tcc
Making `shells` a global declaration does not seem to make tcc happy, so make this a local variable in `xbps_pkg_exec_buffer` instead.
2019-10-27 09:38:50 +01:00
Enno Boland
bc59d0b407 lib/package_script.c: try to find a usable shell instead of using /bin/sh 2019-10-27 09:38:50 +01:00
Juan RP
0677678387 Added LTO support and fix warnings (maybe-uninitialized). 2019-06-27 18:09:26 +02:00
Michael Gehring
618e504d30 actually use HAVE_FDATASYNC 2016-02-08 15:09:43 +01:00
Juan RP
430a25f422 libxbps: execute pkg scripts with /bin/sh directly.
The pkg INSTALL/REMOVE scripts do not need to have the executable
bit set anymore, thus /tmp can be mounted with 'noexec' from now on.

GH #149
2016-02-02 11:28:48 +01:00
Juan RP
36026451ce Fix some insecure temporary files reported by Coverity. 2015-07-26 09:02:04 +02:00
Juan RP
5b522109f7 Replaced config/system {repo,preserve,virtualpkg}.d with a single directory.
See the NEWS file for more information.
2014-11-06 09:58:04 +01:00
Juan RP
ef3b6278a6 Added support to pass native machine architecture to pkg scripts (6th arg). 2014-03-12 10:16:37 +01:00
Juan RP
1bea5725ae lib/package_script.c: misc cleanups. 2013-08-29 12:13:59 +02:00
Juan RP
42c0766c00 Get rid of libfetch and proplib external dependencies.
The list of required external deps is now confuse, libarchive and openssl.

libxbps now includes a wrapper for proplib prefixed with xbps_ rather than prop_.
2013-06-20 10:26:12 +02:00
Juan RP
db1efb3aa6 Relax memory requirements on 64bit platforms; fix two memleaks. 2013-06-12 10:04:10 +02:00
Juan RP
5eddf04898 Ignore executing install/remove scripts if XBPS_TARGET_ARCH is set.
Instead a two stage approach is necessary when packages for target arch
are installed:

	- XBPS_TARGET_ARCH=arch xbps-install foo <- only unpack
	- xbps-reconfigure -a <- configure natively or via an emulator
2013-03-07 18:08:12 +01:00
Juan RP
98adbf34a1 xbps_pkg_exec_buffer: pass correct args to the install/remove scripts. 2013-03-07 11:56:08 +01:00
Juan RP
7c1a0ac3e8 New pkgdb (0.21) and repo index (1.7) format, see NEWS for info. 2013-03-05 04:08:42 +01:00
Juan RP
4f9ff2746e xbps_pkg_exec_buffer: chdir to rootdir before creating fd. 2012-11-19 14:59:42 +01:00
Juan RP
cc99e887a2 xbps_pkg_exec_buffer: if rootdir != / create tmp files on rootdir. 2012-11-17 12:08:25 +01:00
Juan RP
34bd49f85a New pkg metadata structure for 0.18. See the NEWS file for info. 2012-11-16 16:55:35 +01:00