firejail: update to 0.9.28

+ Also fix musl libc
Closes #2193
This commit is contained in:
Jürgen Buchmüller 2015-08-31 15:33:43 +02:00
parent f09403fc7c
commit 738e28e958
2 changed files with 50 additions and 3 deletions

View file

@ -0,0 +1,33 @@
#ifndef _MUSL_DEFS_H
#define _MUSL_DEFS_H
#include <features.h>
#define __NEED_FILE
#define __NEED_dev_t
#define __NEED_ino_t
#define __NEED_mode_t
#define __NEED_nlink_t
#define __NEED_uid_t
#define __NEED_gid_t
#define __NEED_off_t
#define __NEED_time_t
#define __NEED_blksize_t
#define __NEED_blkcnt_t
#define __NEED_struct_timespec
#include <bits/alltypes.h>
#include <bits/stat.h>
#ifdef __cplusplus
#define NULL 0L
#else
#define NULL ((void*)0)
#endif
int printf(const char *format, ...);
int sprintf(char *buffer, const char *format, ...);
char *fgets(char *buffer, int size, FILE *fp);
#endif

View file

@ -1,7 +1,7 @@
# Template file for 'firejail'
pkgname=firejail
version=0.9.26
revision=2
version=0.9.28
revision=1
build_style=gnu-configure
build_pie=yes
conf_files="
@ -34,7 +34,7 @@ maintainer="Duncaen <mail@duncano.de>"
license="GPL-2"
homepage="https://l3net.wordpress.com/projects/firejail/"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
checksum=9195a15365ac73b7aa2c9816b94644e367f25ff58111b6786f94b27caf462561
checksum=bd91888aff9abbfce0d2963c7d28bedf4362fd29976ca8ede80c6f59a3ac4cad
case "$XBPS_TARGET_MACHINE" in
arm*)
@ -42,6 +42,20 @@ case "$XBPS_TARGET_MACHINE" in
;;
esac
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*-musl) # XXX: dirty hack - very limited stdio.h definitions
# to avoid redefinition of intercepted libc functions
cp ${FILESDIR}/musl_defs.h ${wrksrc}/src/libtrace
# Include our header instead of stdio.h and sys/stat.h
# Use struct stat instead of struct stat64 (they are equal)
sed -i ${wrksrc}/src/libtrace/libtrace.c \
-e 's;#include <stdio.h>;#include "musl_defs.h";' \
-e 's;#include <sys/stat.h>;;' \
-e 's;struct stat64;struct stat;g'
esac
}
pre_install() {
# remove hardcoded strip(1)
sed -i '/strip .*/d' Makefile