M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions
@@ -0,0 +1,25 @@
Upstream-Status: Pending
--- at-3.1.12/configure.ac 2011-06-23 14:51:03.653572945 +0800
+++ at-3.1.12/configure.ac.new 2011-06-27 16:12:14.903572945 +0800
@@ -81,10 +81,18 @@
AC_FUNC_VPRINTF
AC_FUNC_GETLOADAVG
AC_CHECK_FUNCS(getcwd mktime strftime setreuid setresuid sigaction waitpid)
+
+AC_ARG_WITH([pam],
+ [AS_HELP_STRING([--without-pam], [without PAM support])])
+
+if test "x$with_pam" != xno; then
AC_CHECK_HEADERS(security/pam_appl.h, [
PAMLIB="-lpam"
- AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support])
-])
+ AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support])],
+ [if test "x$with_pam" = xyes; then
+ AC_MSG_ERROR([PAM selected but security/pam_misc.h not found])
+ fi])
+fi
dnl Checking for programs
@@ -0,0 +1,29 @@
Fix cross-compilation issues in configure.ac
Derived from an OE patch for at-3.1.8
Upstream-Status: Pending
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Index: at-3.1.12/configure.ac
===================================================================
--- at-3.1.12.orig/configure.ac
+++ at-3.1.12/configure.ac
@@ -38,12 +38,11 @@ case "$host" in
AC_MSG_RESULT(no)
;;
esac
+if [ X"${cross_compiling}" = Xno ]; then
AC_MSG_CHECKING(Trying to compile a trivial ANSI C program)
-AC_TRY_RUN([ main(int ac, char **av) { return 0; } ],
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no)
- AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.),
- AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.))
+AC_RUN_IFELSE([AC_LANG_SOURCE([[ main(int ac, char **av) { return 0; } ]])],[AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)],[AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)])
+fi
AC_MSG_CHECKING(__attribute__((noreturn)))
AC_TRY_COMPILE([], [void __attribute__((noreturn)) panic(void);],
@@ -0,0 +1,28 @@
make -j was failing sometimesa like this
| ccache i586-poky-linux-gcc -march=i586 --sysroot=/home/nitin/build/build0/tmp/sysroots/i586-poky-linux -I. -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debug-types -o atd atd.o daemon.o -lfl -lpam -Wl,-O1 -Wl,--as-needed
| parsetime.l:5:19: fatal error: y.tab.h: No such file or directory
| compilation terminated.
| make: *** [lex.yy.o] Error 1
| make: *** Waiting for unfinished jobs....
Fixed the issue by adding a dependancy in the makefile.
Nitin <nitin.a.kamble@intel.com>
2010/09/02
Upstream-Status: Pending
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Index: at-3.1.12/Makefile.in
===================================================================
--- at-3.1.12.orig/Makefile.in
+++ at-3.1.12/Makefile.in
@@ -83,6 +83,8 @@ y.tab.c y.tab.h: parsetime.y
lex.yy.c: parsetime.l
$(LEX) -i parsetime.l
+parsetime.l: y.tab.h
+
atrun: atrun.in
configure
@@ -0,0 +1,21 @@
oe doesn't support "@include", use the concrete directive instead.
Upstream-Status: Pending
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
--- at-3.1.12/pam.conf.orig 2009-11-23 23:11:52.000000000 +0800
+++ at-3.1.12/pam.conf 2011-07-15 11:14:04.132818950 +0800
@@ -2,8 +2,8 @@
# The PAM configuration file for the at daemon
#
-auth required pam_env.so
-@include common-auth
-@include common-account
-@include common-session-noninteractive
-session required pam_limits.so
+auth required pam_env.so
+auth include common-auth
+account include common-account
+session include common-session-noninteractive
+session required pam_limits.so
@@ -0,0 +1,64 @@
SUMMARY = "Delayed job execution and batch processing"
DESCRIPTION = "At allows for commands to be run at a particular time. Batch will execute commands when \
the system load levels drop to a particular level."
SECTION = "base"
LICENSE="GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
DEPENDS = "flex initscripts \
${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)}"
PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
RCONFLICTS_${PN} = "atd"
RREPLACES_${PN} = "atd"
PR = "r7"
SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \
file://configure.patch \
file://use-ldflags.patch \
file://nonstripbinaries.patch \
file://fix_parallel_build_error.patch \
file://posixtm.c \
file://posixtm.h \
file://file_replacement_with_gplv2.patch \
file://S99at \
${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
PAM_SRC_URI = "file://pam.conf.patch \
file://configure-add-enable-pam.patch"
SRC_URI[md5sum] = "1e67991776148fb319fd77a2e599a765"
SRC_URI[sha256sum] = "7c55c6ab4fbe8add9e68f31b2b0ebf3fe805c9a4e7cfb2623a3d8a4789cc18f3"
EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
--with-daemon_username=root \
--with-daemon_groupname=root \
--with-jobdir=/var/spool/at/jobs \
--with-atspool=/var/spool/at/spool \
${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} "
inherit autotools
do_compile_prepend () {
cp -f ${WORKDIR}/posixtm.[ch] ${S}
}
do_install () {
oe_runmake "IROOT=${D}" install
install -d ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/rcS.d
install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd
ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at
cp -r ${D}/usr/doc/at ${D}${docdir}/
rm -rf ${D}/usr/doc
for feature in ${DISTRO_FEATURES}; do
if [ "$feature" = "pam" ]; then
install -D -m 0644 ${WORKDIR}/${P}/pam.conf ${D}${sysconfdir}/pam.d/atd
break
fi
done
}
PARALLEL_MAKE = ""
@@ -0,0 +1,39 @@
#!/bin/sh
#
# Starts at daemon
#
umask 077
start() {
echo -n "Starting atd: "
start-stop-daemon --start --quiet --make-pidfile --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f
echo "OK"
}
stop() {
echo -n "Stopping atd: "
start-stop-daemon --stop --quiet --pidfile /var/run/atd.pid
echo "OK"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
@@ -0,0 +1,30 @@
Upstream-Status: Inappropriate [licensing]
posixtm.[ch] files are replaced with gplv2 version from these locations:
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/posixtm.c;hb=5661ab9d49512b4cf3c19caa11bb581d8ce561ba
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/posixtm.h;hb=5661ab9d49512b4cf3c19caa11bb581d8ce561ba
update the Copyright file information to reflect the replaced files.
Date: 2010/08/31
Nitin A Kamble nitin.a.kamble@intel.com
Index: at-3.1.12/Copyright
===================================================================
--- at-3.1.12.orig/Copyright
+++ at-3.1.12/Copyright
@@ -31,10 +31,10 @@ The files posixtm.c and posixtm.h have t
Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007 Free Software Foundation Inc.
- This program is free software: you can redistribute it and/or modify
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -0,0 +1,26 @@
Upstream-Status: Pending
#Because remove nonrootinstall patch, the stripping of the binaries can not
#be handled.
#This patch is to handle the stripping of the binaries.
#Mei Lei<lei.mei@intel.com> make this change
diff --git at-3.1.12.orig/Makefile.in at-3.1.12/Makefile.in
index dae6b7d..71a5d89 100644
--- at-3.1.12.orig/Makefile.in
+++ at-3.1.12/Makefile.in
@@ -97,14 +97,14 @@ install: all
chmod 600 $(IROOT)$(LFILE)
chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(IROOT)$(LFILE)
test -f $(IROOT)$(etcdir)/at.allow || test -f $(IROOT)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(IROOT)$(etcdir)/
- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 -s at $(IROOT)$(bindir)
+ $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 at $(IROOT)$(bindir)
$(LN_S) -f at $(IROOT)$(bindir)/atq
$(LN_S) -f at $(IROOT)$(bindir)/atrm
$(INSTALL) -g root -o root -m 755 batch $(IROOT)$(bindir)
$(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man1dir)
$(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man5dir)
$(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man8dir)
- $(INSTALL) -g root -o root -m 755 -s atd $(IROOT)$(sbindir)
+ $(INSTALL) -g root -o root -m 755 atd $(IROOT)$(sbindir)
$(INSTALL) -g root -o root -m 755 atrun $(IROOT)$(sbindir)
$(INSTALL) -g root -o root -m 644 at.1 $(IROOT)$(man1dir)/
cd $(IROOT)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1
@@ -0,0 +1,328 @@
/* Parse dates for touch and date.
Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007 Free Software Foundation Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Yacc-based version written by Jim Kingdon and David MacKenzie.
Rewritten by Jim Meyering. */
#include <config.h>
#include "posixtm.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#if USE_UNLOCKED_IO
# include "unlocked-io.h"
#endif
/* ISDIGIT differs from isdigit, as follows:
- Its arg may be any int or unsigned int; it need not be an unsigned char
or EOF.
- It's typically faster.
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
isdigit unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
time_t mktime ();
/*
POSIX requires:
touch -t [[CC]YY]mmddhhmm[.ss] FILE...
8, 10, or 12 digits, followed by optional .ss
(PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS)
touch mmddhhmm[YY] FILE... (obsoleted by POSIX 1003.1-2001)
8 or 10 digits, YY (if present) must be in the range 69-99
(PDS_TRAILING_YEAR | PDS_PRE_2000)
date mmddhhmm[[CC]YY]
8, 10, or 12 digits
(PDS_TRAILING_YEAR | PDS_CENTURY)
*/
static int
year (struct tm *tm, const int *digit_pair, size_t n, unsigned int syntax_bits)
{
switch (n)
{
case 1:
tm->tm_year = *digit_pair;
/* Deduce the century based on the year.
POSIX requires that 00-68 be interpreted as 2000-2068,
and that 69-99 be interpreted as 1969-1999. */
if (digit_pair[0] <= 68)
{
if (syntax_bits & PDS_PRE_2000)
return 1;
tm->tm_year += 100;
}
break;
case 2:
if (! (syntax_bits & PDS_CENTURY))
return 1;
tm->tm_year = digit_pair[0] * 100 + digit_pair[1] - 1900;
break;
case 0:
{
time_t now;
struct tm *tmp;
/* Use current year. */
time (&now);
tmp = localtime (&now);
if (! tmp)
return 1;
tm->tm_year = tmp->tm_year;
}
break;
default:
abort ();
}
return 0;
}
static int
posix_time_parse (struct tm *tm, const char *s, unsigned int syntax_bits)
{
const char *dot = NULL;
int pair[6];
int *p;
size_t i;
size_t s_len = strlen (s);
size_t len = (((syntax_bits & PDS_SECONDS) && (dot = strchr (s, '.')))
? (size_t) (dot - s)
: s_len);
if (len != 8 && len != 10 && len != 12)
return 1;
if (dot)
{
if (!(syntax_bits & PDS_SECONDS))
return 1;
if (s_len - len != 3)
return 1;
}
for (i = 0; i < len; i++)
if (!ISDIGIT (s[i]))
return 1;
len /= 2;
for (i = 0; i < len; i++)
pair[i] = 10 * (s[2*i] - '0') + s[2*i + 1] - '0';
p = pair;
if (syntax_bits & PDS_LEADING_YEAR)
{
if (year (tm, p, len - 4, syntax_bits))
return 1;
p += len - 4;
len = 4;
}
/* Handle 8 digits worth of `MMDDhhmm'. */
tm->tm_mon = *p++ - 1;
tm->tm_mday = *p++;
tm->tm_hour = *p++;
tm->tm_min = *p++;
len -= 4;
/* Handle any trailing year. */
if (syntax_bits & PDS_TRAILING_YEAR)
{
if (year (tm, p, len, syntax_bits))
return 1;
}
/* Handle seconds. */
if (!dot)
{
tm->tm_sec = 0;
}
else
{
int seconds;
++dot;
if (!ISDIGIT (dot[0]) || !ISDIGIT (dot[1]))
return 1;
seconds = 10 * (dot[0] - '0') + dot[1] - '0';
tm->tm_sec = seconds;
}
return 0;
}
/* Parse a POSIX-style date, returning true if successful. */
bool
posixtime (time_t *p, const char *s, unsigned int syntax_bits)
{
struct tm tm0
#ifdef lint
/* Placate gcc-4's -Wuninitialized.
posix_time_parse fails to set all of tm0 only when it returns
nonzero (due to year() returning nonzero), and in that case,
this code doesn't use the tm0 at all. */
= { 0, }
#endif
;
struct tm tm1;
struct tm const *tm;
time_t t;
if (posix_time_parse (&tm0, s, syntax_bits))
return false;
tm1 = tm0;
tm1.tm_isdst = -1;
t = mktime (&tm1);
if (t != (time_t) -1)
tm = &tm1;
else
{
/* mktime returns -1 for errors, but -1 is also a valid time_t
value. Check whether an error really occurred. */
tm = localtime (&t);
if (! tm)
return false;
}
/* Reject dates like "September 31" and times like "25:61". */
if ((tm0.tm_year ^ tm->tm_year)
| (tm0.tm_mon ^ tm->tm_mon)
| (tm0.tm_mday ^ tm->tm_mday)
| (tm0.tm_hour ^ tm->tm_hour)
| (tm0.tm_min ^ tm->tm_min)
| (tm0.tm_sec ^ tm->tm_sec))
return false;
*p = t;
return true;
}
#ifdef TEST_POSIXTIME
/*
Test mainly with syntax_bits == 13
(aka: (PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS))
This test data assumes Universal Time, e.g., TZ="UTC0".
This test data also assumes that time_t is signed and is at least
39 bits wide, so that it can represent all years from 0000 through
9999. A host with 32-bit signed time_t can represent only time
stamps in the range 1901-12-13 20:45:52 through 2038-01-18
03:14:07 UTC, assuming POSIX time_t with no leap seconds, so test
cases outside this range will not work on such a host.
Also, the first two lines of test data assume that the current
year is 2002.
BEGIN-DATA
12131415.16 13 1039788916 Fri Dec 13 14:15:16 2002
12131415.16 13 1039788916 Fri Dec 13 14:15:16 2002
000001010000.00 13 -62167132800 Sun Jan 1 00:00:00 0000
190112132045.52 13 -2147483648 Fri Dec 13 20:45:52 1901
190112132045.53 13 -2147483647 Fri Dec 13 20:45:53 1901
190112132046.52 13 -2147483588 Fri Dec 13 20:46:52 1901
190112132145.52 13 -2147480048 Fri Dec 13 21:45:52 1901
190112142045.52 13 -2147397248 Sat Dec 14 20:45:52 1901
190201132045.52 13 -2144805248 Mon Jan 13 20:45:52 1902
196912312359.59 13 -1 Wed Dec 31 23:59:59 1969
197001010000.00 13 0 Thu Jan 1 00:00:00 1970
197001010000.01 13 1 Thu Jan 1 00:00:01 1970
197001010001.00 13 60 Thu Jan 1 00:01:00 1970
197001010100.00 13 3600 Thu Jan 1 01:00:00 1970
197001020000.00 13 86400 Fri Jan 2 00:00:00 1970
197002010000.00 13 2678400 Sun Feb 1 00:00:00 1970
197101010000.00 13 31536000 Fri Jan 1 00:00:00 1971
197001000000.00 13 * *
197000010000.00 13 * *
197001010000.60 13 * *
197001010060.00 13 * *
197001012400.00 13 * *
197001320000.00 13 * *
197013010000.00 13 * *
203801190314.06 13 2147483646 Tue Jan 19 03:14:06 2038
203801190314.07 13 2147483647 Tue Jan 19 03:14:07 2038
203801190314.08 13 2147483648 Tue Jan 19 03:14:08 2038
999912312359.59 13 253402300799 Fri Dec 31 23:59:59 9999
1112131415 13 1323785700 Tue Dec 13 14:15:00 2011
1112131415.16 13 1323785716 Tue Dec 13 14:15:16 2011
201112131415.16 13 1323785716 Tue Dec 13 14:15:16 2011
191112131415.16 13 -1831974284 Wed Dec 13 14:15:16 1911
203712131415.16 13 2144326516 Sun Dec 13 14:15:16 2037
3712131415.16 13 2144326516 Sun Dec 13 14:15:16 2037
6812131415.16 13 3122633716 Thu Dec 13 14:15:16 2068
6912131415.16 13 -1590284 Sat Dec 13 14:15:16 1969
7012131415.16 13 29945716 Sun Dec 13 14:15:16 1970
1213141599 2 945094500 Mon Dec 13 14:15:00 1999
1213141500 2 976716900 Wed Dec 13 14:15:00 2000
END-DATA
*/
# define MAX_BUFF_LEN 1024
int
main (void)
{
char buff[MAX_BUFF_LEN + 1];
buff[MAX_BUFF_LEN] = 0;
while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
{
char time_str[MAX_BUFF_LEN];
unsigned int syntax_bits;
time_t t;
if (sscanf (buff, "%s %u", time_str, &syntax_bits) != 2)
printf ("*\n");
else
{
printf ("%-15s %2u ", time_str, syntax_bits);
if (posixtime (&t, time_str, syntax_bits))
printf ("%12ld %s", (long int) t, ctime (&t));
else
printf ("%12s %s", "*", "*\n");
}
}
exit (0);
}
#endif
/*
Local Variables:
compile-command: "gcc -DTEST_POSIXTIME -g -O -Wall -W posixtm.c"
End:
*/
@@ -0,0 +1,37 @@
/* Parse dates for touch and date.
Copyright (C) 1998, 2003, 2005, 2007 Free Software Foundation Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Yacc-based version written by Jim Kingdon and David MacKenzie.
Rewritten by Jim Meyering. */
#ifndef POSIXTM_H_
# define POSIXTM_H_
# include <stdbool.h>
# include <time.h>
/* POSIX Date Syntax flags. */
# define PDS_LEADING_YEAR 1
# define PDS_TRAILING_YEAR 2
# define PDS_CENTURY 4
# define PDS_SECONDS 8
# define PDS_PRE_2000 16
bool posixtime (time_t *p, const char *s, unsigned int syntax_bits);
#endif
@@ -0,0 +1,23 @@
Upstream-Status: Pending
# Ensure use of $LDFLAGS during build
# Derived from an OE patch for at-3.1.8
--- at-3.1.12.orig/Makefile.in 2009-11-23 07:11:52.000000000 -0800
+++ at-3.1.12/Makefile.in 2010-07-20 16:28:04.000000000 -0700
@@ -65,13 +65,13 @@
all: at atd atrun
at: $(ATOBJECTS)
- $(CC) $(CFLAGS) -o at $(ATOBJECTS) $(LIBS) $(LEXLIB)
+ $(CC) $(CFLAGS) -o at $(ATOBJECTS) $(LIBS) $(LEXLIB) $(LDFLAGS)
rm -f $(CLONES)
$(LN_S) -f at atq
$(LN_S) -f at atrm
atd: $(RUNOBJECTS)
- $(CC) $(CFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB)
+ $(CC) $(CFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(LDFLAGS)
y.tab.c y.tab.h: parsetime.y
$(YACC) -d parsetime.y
@@ -0,0 +1,29 @@
DESCRIPTION = "Augeas configuration API"
HOMEPAGE = "http://augeas.net/"
BUGTRACKER = "https://fedorahosted.org/augeas/report/1"
LICENSE = "LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
SRC_URI = "http://augeas.net/download/${BP}.tar.gz"
DEPENDS = "readline"
inherit autotools
PACKAGES =+ "${PN}-lenses lib${BPN} lib${BPN}-dev lib${BPN}-staticdev lib${BPN}-dbg"
FILES_${PN}-lenses = "${datadir}/augeas/lenses"
FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}"
FILES_lib${BPN}-dev = "${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${includedir} ${libdir}/pkgconfig"
FILES_lib${BPN}-staticdev = "${libdir}/*.a"
FILES_lib${BPN}-dbg = "${libdir}/.debug"
RDEPENDS_lib${BPN} += "${PN}-lenses"
RRECOMMENDS_lib${BPN} += "${PN}"
LEAD_SONAME = "libaugeas.so"
do_install_append() {
rm -fr ${D}${datadir}/vim
}
@@ -0,0 +1,6 @@
require augeas.inc
PR = "r1"
SRC_URI[md5sum] = "fe1834e90a066c3208ac0214622c7352"
SRC_URI[sha256sum] = "ec111af06186216930176ebe5ecccdf7bf528528aee9acde1d5d70088484afca"
@@ -0,0 +1,17 @@
Upstream-Status: Inappropriate [embedded specific]
--- execute_cmd.c.orig Fri Jun 3 13:34:42 2011
+++ execute_cmd.c Fri Jun 3 13:36:41 2011
@@ -2202,7 +2202,11 @@
/* If the `lastpipe' option is set with shopt, and job control is not
enabled, execute the last element of non-async pipelines in the
current shell environment. */
- if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
+ if (lastpipe_opt &&
+#if defined(JOB_CONTROL)
+ job_control == 0 &&
+#endif
+ asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
{
lstdin = move_to_high_fd (0, 0, 255);
if (lstdin > 0)
@@ -0,0 +1,37 @@
DESCRIPTION = "An sh-compatible command language interpreter."
HOMEPAGE = "http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html"
SECTION = "base/shell"
# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
DEPENDS = "ncurses bison-native"
inherit autotools gettext update-alternatives
PARALLEL_MAKE = ""
bindir = "/bin"
sbindir = "/sbin"
EXTRA_OECONF = "--enable-job-control"
export CC_FOR_BUILD = "${BUILD_CC}"
ALTERNATIVE_NAME = "sh"
ALTERNATIVE_PATH = "${base_bindir}/bash"
ALTERNATIVE_LINK = "${base_bindir}/sh"
ALTERNATIVE_PRIORITY = "100"
export AUTOHEADER = "true"
do_configure_prepend () {
if [ ! -e acinclude.m4 ]; then
cat aclocal.m4 > acinclude.m4
fi
}
pkg_postinst_${PN} () {
touch $D${sysconfdir}/shells
grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
}
@@ -0,0 +1,50 @@
DESCRIPTION = "An sh-compatible command language interpreter."
HOMEPAGE = "http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html"
SECTION = "base/shell"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=fd5d9bcabd8ed5a54a01ce8d183d592a"
DEPENDS = "ncurses"
PR = "r9"
SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
${GNU_MIRROR}/bash/bash-3.2-patches/bash32-049;apply=yes;striplevel=0;name=patch001 \
${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch002 \
${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch003"
SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
SRC_URI[tarball.sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348"
SRC_URI[patch001.md5sum] = "af571a2d164d5abdcae4499e94e8892c"
SRC_URI[patch001.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f"
SRC_URI[patch002.md5sum] = "8443d4385d73ec835abe401d90591377"
SRC_URI[patch002.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642"
SRC_URI[patch003.md5sum] = "15c6653042e9814aa87120098fc7a849"
SRC_URI[patch003.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef"
SRC_URI[md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
SRC_URI[sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348"
inherit autotools gettext
PARALLEL_MAKE = ""
bindir = "/bin"
sbindir = "/sbin"
EXTRA_OECONF = "--with-ncurses"
export CC_FOR_BUILD = "${BUILD_CC}"
export AUTOHEADER = "true"
do_configure_prepend () {
if [ ! -e acinclude.m4 ]; then
cat aclocal.m4 > acinclude.m4
fi
}
pkg_postinst_${PN} () {
touch $D${sysconfdir}/shells
grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
}
@@ -0,0 +1,41 @@
require bash.inc
PR = "r1"
SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
${GNU_MIRROR}/bash/bash-4.2-patches/bash42-001;apply=yes;striplevel=0;name=patch001 \
${GNU_MIRROR}/bash/bash-4.2-patches/bash42-002;apply=yes;striplevel=0;name=patch002 \
${GNU_MIRROR}/bash/bash-4.2-patches/bash42-003;apply=yes;striplevel=0;name=patch003 \
${GNU_MIRROR}/bash/bash-4.2-patches/bash42-004;apply=yes;striplevel=0;name=patch004 \
${GNU_MIRROR}/bash/bash-4.2-patches/bash42-005;apply=yes;striplevel=0;name=patch005 \
${GNU_MIRROR}/bash/bash-4.2-patches/bash42-006;apply=yes;striplevel=0;name=patch006 \
${GNU_MIRROR}/bash/bash-4.2-patches/bash42-007;apply=yes;striplevel=0;name=patch007 \
${GNU_MIRROR}/bash/bash-4.2-patches/bash42-008;apply=yes;striplevel=0;name=patch008 \
${GNU_MIRROR}/bash/bash-4.2-patches/bash42-009;apply=yes;striplevel=0;name=patch009 \
${GNU_MIRROR}/bash/bash-4.2-patches/bash42-010;apply=yes;striplevel=0;name=patch010 \
file://execute_cmd.patch;striplevel=0 \
"
SRC_URI[tarball.md5sum] = "3fb927c7c33022f1c327f14a81c0d4b0"
SRC_URI[tarball.sha256sum] = "a27a1179ec9c0830c65c6aa5d7dab60f7ce1a2a608618570f96bfa72e95ab3d8"
SRC_URI[patch001.md5sum] = "1100bc1dda2cdc06ac44d7e5d17864a3"
SRC_URI[patch001.sha256sum] = "8d6ca028576c4af23e660a2fbc2112221a11c8a785c0b37f033967e5cd12b47a"
SRC_URI[patch002.md5sum] = "30e7948079921d3261efcc6a40722135"
SRC_URI[patch002.sha256sum] = "febac927e199aceeba2004908d971d4afb49b521796c3f42d1166f9fbbfbcef9"
SRC_URI[patch003.md5sum] = "9ea06decec43a198f3d7cf29acc602f8"
SRC_URI[patch003.sha256sum] = "5a0a7c15018c87348ea87cb0beea14345faf878dbb0e25c17fa70677194cb4cd"
SRC_URI[patch004.md5sum] = "fb48f6134d7b013135929476aa0c250c"
SRC_URI[patch004.sha256sum] = "4e34b0f830d2583d56e14225a66937abc81f45bbafcd2eb49daf61c9462140c1"
SRC_URI[patch005.md5sum] = "e70e45de33426b38153b390be0dbbcd4"
SRC_URI[patch005.sha256sum] = "a81749e73004b81cfdf0fe075bec365dc1fef756ee5e3fd142821e317d1459a0"
SRC_URI[patch006.md5sum] = "ce4e5c484993705b27daa151eca242c2"
SRC_URI[patch006.sha256sum] = "c91148945a2ddafa792682d7c8668c59e7e645eae1334b15b0d5d9ad22634bd1"
SRC_URI[patch007.md5sum] = "88d1f96db29461767602e2546803bda7"
SRC_URI[patch007.sha256sum] = "405826acf443dd1084f236a15cb76d7f0ee2dbe5edff45c5fb836db571fb7e95"
SRC_URI[patch008.md5sum] = "24c574bf6d6a581e300823d9c1276af6"
SRC_URI[patch008.sha256sum] = "23080d11a60a78941210e2477f6bca066b45db03defa60da86fd765107ba2437"
SRC_URI[patch009.md5sum] = "4c5835f2fbab36c4292bb334977e5b6d"
SRC_URI[patch009.sha256sum] = "e7ed5440b4c19765786e90e4f1ded43195d38b3e4d1c4b39fcc23de9a74ccb20"
SRC_URI[patch010.md5sum] = "0a51602b535ef661ee707be6c8bdb373"
SRC_URI[patch010.sha256sum] = "acfc5482c25e6923116fcf4b4f7f6345b80f75ad7299749db4b736ad67aa43dc"
@@ -0,0 +1,21 @@
DESCRIPTION = "An arbitrary precision calculator language."
HOMEPAGE = "http://www.gnu.org/software/bc/bc.html"
BUGTRACKER = ""
LICENSE = "GPLv2+ & LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
file://bc/bcdefs.h;endline=31;md5=46dffdaf10a99728dd8ce358e45d46d8 \
file://dc/dc.h;endline=25;md5=2f9c558cdd80e31b4d904e48c2374328 \
file://lib/number.c;endline=31;md5=99434a0898abca7784acfd36b8191199"
SECTION = "base"
DEPENDS = "flex"
PR = "r0"
SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz"
SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"
inherit autotools
@@ -0,0 +1,24 @@
SUMMARY = "Tune low-level block device parameters"
DESCRIPTION = "blktool is used for querying and/or changing settings \
of a block device. It is like hdparm but a more general tool, as it \
works on SCSI, IDE and SATA devices."
HOMEPAGE = "http://packages.debian.org/unstable/admin/blktool"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://blktool.c;beginline=7;endline=8;md5=a5e798ea98fd50972088968a15e5f373"
DEPENDS = "glib-2.0"
PR = "r0"
SRC_URI = "${DEBIAN_MIRROR}/main/b/blktool/blktool_4.orig.tar.gz;name=tarball \
${DEBIAN_MIRROR}/main/b/blktool/blktool_4-6.diff.gz;apply=yes;name=patch"
SRC_URI[tarball.md5sum] = "62edc09c9908107e69391c87f4f3fd40"
SRC_URI[tarball.sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764"
SRC_URI[patch.md5sum] = "2d1bc2f2c38b65d47e27da7c7508d17f"
SRC_URI[patch.sha256sum] = "999f2062203e389327d997724621be37bea9c98fa226238f9f4eb4a6ea25bd4b"
S = "${WORKDIR}/${BPN}-4.orig"
inherit autotools
@@ -0,0 +1,17 @@
SUMMARY = "Berkeley LALR Yacc parser generator"
DESCRIPTION = "A parser generator utility that reads a grammar specification from a file and generates an LR(1) \
parser for it. The parsers consist of a set of LALR(1) parsing tables and a driver routine written in the C \
programming language."
SECTION = "devel"
LICENSE = "PD"
SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz"
EXTRA_OECONF += "--program-transform-name='s,^,b,'"
BBCLASSEXTEND = "native"
inherit autotools
do_configure() {
oe_runconf
}
@@ -0,0 +1,13 @@
PR = "r0"
# Sigh. This is one of those places where everyone licenses it differently. Someone
# even apply UCB to it (Free/Net/OpenBSD). The maintainer states that:
# "I've found no reliable source which states that byacc must bear a UCB copyright."
# Setting to PD as this is what the upstream has it as.
LICENSE="PD"
LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=4dc4c30f840a7203fb6edf20b3db849e"
require byacc.inc
SRC_URI[md5sum] = "c17542fd9df6e392d495a64f883e29f1"
SRC_URI[sha256sum] = "ca37eb3702a02efe4a4dd09e0ef26fc91e4c22c36d8d52e45d2f76923fbd99d9"
@@ -0,0 +1,41 @@
lib_LTLIBRARIES = libbz2.la
libbz2_la_SOURCES = blocksort.c \
huffman.c \
crctable.c \
randtable.c \
compress.c \
decompress.c \
bzlib.c
bin_PROGRAMS = bzip2 bzip2recover
bzip2_SOURCES = bzip2.c
bzip2_LDADD = libbz2.la
bzip2_DEPENDENCIES = libbz2.la
include_HEADERS = bzlib.h
bzip2recover_SOURCES = bzip2recover.c
bzip2recover_LDADD = libbz2.la
bzip2recover_DEPENDENCIES = libbz2.la
bin_SCRIPTS = bzgrep bzmore bzdiff
man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1
EXTRA_DIST = $(man_MANS)
install-exec-hook:
ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT)
ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT)
ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzegrep$(EXEEXT)
ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzfgrep$(EXEEXT)
ln -s $(bindir)/bzmore$(EXEEXT) $(DESTDIR)$(bindir)/bzless$(EXEEXT)
ln -s $(bindir)/bzdiff$(EXEEXT) $(DESTDIR)$(bindir)/bzcmp$(EXEEXT)
install-data-hook:
echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzegrep.1
echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzfgrep.1
echo ".so man1/bzmore.1" > $(DESTDIR)$(mandir)/man1/bzless.1
echo ".so man1/bzdiff.1" > $(DESTDIR)$(mandir)/man1/bzcmp.1
@@ -0,0 +1,14 @@
AC_PREREQ([2.57])
AC_INIT(bzip2, 2.0.5, , libXrender)
AM_INIT_AUTOMAKE()
AM_MAINTAINER_MODE
#AM_CONFIG_HEADER(config.h)
# Check for progs
AC_PROG_CC
AC_PROG_LIBTOOL
AC_OUTPUT([Makefile])
@@ -0,0 +1,32 @@
SUMMARY = "Very high-quality data compression program."
DESCRIPTION = "bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and \
Huffman coding. Compression is generally considerably better than that achieved by more conventional \
LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors."
HOMEPAGE = "http://www.bzip.org/"
SECTION = "console/utils"
LICENSE = "BSD-4-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2"
PR = "r4"
SRC_URI = "http://www.bzip.org/${PV}/${BPN}-${PV}.tar.gz \
file://configure.ac \
file://Makefile.am"
SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
inherit autotools update-alternatives
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_LINKS = "${bindir}/bunzip2 ${bindir}/bzcat"
do_configure_prepend () {
cp ${WORKDIR}/configure.ac ${S}/
cp ${WORKDIR}/Makefile.am ${S}/
cp ${STAGING_DATADIR_NATIVE}/automake*/install-sh ${S}/
}
PROVIDES_append_virtclass-native = " bzip2-full-native"
BBCLASSEXTEND = "native"
@@ -0,0 +1,27 @@
SUMMARY = "A system tool for maintaining the /etc/rc*.d hierarchy"
DESCRIPTION = "Chkconfig is a basic system utility. It updates and queries runlevel \
information for system services. Chkconfig manipulates the numerous \
symbolic links in /etc/rc.d, to relieve system administrators of some \
of the drudgery of manually editing the symbolic links."
HOMEPAGE = "http://fedorahosted.org/releases/c/h/chkconfig"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
DEPENDS = "libnewt popt"
PR = "r0"
SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2"
SRC_URI[md5sum] = "35a2d0630f1cb5c251e749eefde70afd"
SRC_URI[sha256sum] = "6a95472873984a0a8e99dca23ce9efe0ffe9db06d9990ce325575f8506babc1c"
inherit autotools gettext
do_install_append() {
mkdir -p ${D}/etc/chkconfig.d
rm -f ${D}/usr/sbin/update-alternatives
}
@@ -0,0 +1,17 @@
Avoid multiple stat definitions
Patch taken from cpio mailing list posting 2010-03-19
Upstream-Status: Pending
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800
+++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700
@@ -82,4 +82,6 @@
#define lstat stat
#endif
int lstat ();
+#ifndef stat
int stat ();
+#endif
@@ -0,0 +1,25 @@
Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
This patch avoids heap overflow reported by :
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
This is a clean patch for the GPLv2 tar recipe.
the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio
recipe, as they share code.
Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
Index: tar-1.17/lib/rtapelib.c
===================================================================
--- tar-1.17.orig/lib/rtapelib.c
+++ tar-1.17/lib/rtapelib.c
@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
sprintf (command_buffer, "R%lu\n", (unsigned long) length);
if (do_command (handle, command_buffer) == -1
- || (status = get_status (handle)) == SAFE_READ_ERROR)
+ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
return SAFE_READ_ERROR;
for (counter = 0; counter < status; counter += rlen, buffer += rlen)
@@ -0,0 +1,31 @@
Upstream-Status: Inappropriate [licensing]
# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
# This is needed to configure correctly with newer versions of autoconf.
diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4
--- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700
+++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700
@@ -1,4 +1,4 @@
-# serial 4 -*- Autoconf -*-
+# serial 5 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
@@ -16,6 +16,7 @@
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
+m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
[
AC_BEFORE([$0], [AC_COMPILE_IFELSE])
@@ -48,7 +49,7 @@
AC_DEFINE([__EXTENSIONS__])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([_TANDEM_SOURCE])
-])
+])])
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------
@@ -0,0 +1,15 @@
Upstream-Status: Inappropriate [licensing]
# Avoid multiple stat definitions
# Patch taken from cpio mailing list posting 2010-03-19
diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800
+++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700
@@ -82,4 +82,6 @@
#define lstat stat
#endif
int lstat ();
+#ifndef stat
int stat ();
+#endif
@@ -0,0 +1,9 @@
include cpio_v2.inc
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
PR = "r0"
SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c"
SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978"
@@ -0,0 +1,16 @@
require cpio_v2.inc
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
PR = "r1"
SRC_URI += "file://m4extensions.patch \
file://avoid_heap_overflow.patch \
"
SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1"
SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad"
# Required to build with gcc 4.3 and later:
CFLAGS += "-fgnu89-inline"
@@ -0,0 +1,41 @@
SUMMARY = "GNU cpio is a program to manage archives of files"
DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \
another. It handles a number of cpio formats as well as reading and writing tar files."
HOMEPAGE = "http://www.gnu.org/software/cpio/"
SECTION = "base"
DEPENDS = "texinfo-native"
SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
file://statdef.patch \
"
inherit autotools gettext
S = "${WORKDIR}/cpio-${PV}"
do_install () {
autotools_do_install
install -d ${D}${base_bindir}/
mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio.${PN}"
case ${TARGET_OS} in
*-uclibc*) ;;
*) mv "${D}${libexecdir}/rmt" "${D}${libexecdir}/rmt.${PN}" ;;
esac
}
pkg_postinst_${PN} () {
update-alternatives --install ${base_bindir}/cpio cpio cpio.${PN} 100
if [ -f ${libexecdir}/rmt.${PN} ]
then
update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 50
fi
}
pkg_prerm_${PN} () {
update-alternatives --remove cpio cpio.${PN}
if [ -f ${libexecdir}/rmt.${PN} ]
then
update-alternatives --remove rmt rmt.${PN}
fi
}
@@ -0,0 +1,15 @@
DESCRIPTION = "A pro-active password checker library"
HOMEPAGE = "http://sourceforge.net/projects/cracklib"
LICENSE = "LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
DEPENDS = ""
PR ="r1"
SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz"
SRC_URI[md5sum] = "79053ad8bc714a44cd660cb12116211b"
SRC_URI[sha256sum] = "2b072f67f7267358459424c3ed70f7f5b70919118e6504a90d3bce37a67c1454"
inherit autotools gettext
+69
View File
@@ -0,0 +1,69 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: crond crontab
# Default-Start: 2345
# Default-Stop: 016
# Short-Description: run cron daemon
# Description: cron is a standard UNIX program that runs user-specified
# programs at periodic scheduled times. vixie cron adds a
# number of features to the basic UNIX cron, including better
# security and more powerful configuration options.
### END INIT INFO
CROND=/usr/sbin/crond
CONFIG=/etc/sysconfig/crond
[ -f $CONFIG ] || exit 1
[ -x $CROND ] || exit 1
. $CONFIG
# Source function library.
. /etc/init.d/functions
case "$1" in
start)
if [ $UID -ne 0 ] ; then
echo "User has insufficient privilege."
exit 1
fi
echo -n "Starting crond: "
start-stop-daemon --start --quiet --exec $CROND -- $CRONDARGS
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
echo "OK"
else
echo "FAIL"
fi
;;
stop)
if [ $UID -ne 0 ] ; then
echo "User has insufficient privilege."
exit 1
fi
echo -n "Stopping crond: "
start-stop-daemon --stop --quiet --pidfile /var/run/crond.pid
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
echo "OK"
else
echo "FAIL"
fi
;;
status)
if [ -n "`/bin/pidof $CROND`" ] ; then
echo "crond is running."
else
echo "crond is not running."
fi
;;
restart)
$0 stop && sleep 1 && $0 start
;;
*)
echo "Usage: /etc/init.d/crond {start|stop|status|restart}"
exit 1
esac
exit 0
@@ -0,0 +1,19 @@
password-auth is the Fedora's common pam configure file, use oe common pam
configure files instead.
Upstream-Status: Pending
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
--- cronie-1.4.7/pam/crond.orig 2010-12-16 16:59:02.000000000 +0800
+++ cronie-1.4.7/pam/crond 2011-07-20 09:47:16.080819203 +0800
@@ -4,7 +4,7 @@
#
# No PAM authentication called, auth modules not needed
account required pam_access.so
-account include password-auth
+account include common-account
session required pam_loginuid.so
-session include password-auth
-auth include password-auth
+session include common-session-noninteractive
+auth include common-auth
@@ -0,0 +1,10 @@
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
@@ -0,0 +1,75 @@
SUMMARY = "Cron daemon for executing programs at set times"
DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \
specified programs at scheduled times and related tools. It is based on the \
original cron and has security and configuration enhancements like the \
ability to use pam and SELinux."
HOMEPAGE = "https://fedorahosted.org/cronie/"
BUGTRACKER = "mmaslano@redhat.com"
# Internet Systems Consortium License
LICENSE = "ISC & BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=963ea0772a2adbdcd607a9b2ec320c11 \
file://src/cron.h;endline=20;md5=b425c334265026177128353a142633b4 \
file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
SECTION = "utils"
DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)}"
PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
PR = "r2"
SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
file://crond.init \
file://crontab \
${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
PAM_SRC_URI = "file://crond_pam_config.patch"
SRC_URI[md5sum] = "9b1d2ce6db8d1883e06635f437170657"
SRC_URI[sha256sum] = "a3b910876f255712f1a5c364b74f34b0ceac9f6f3bbc45e854c5722785f513b3"
inherit autotools update-rc.d useradd
EXTRA_OECONF += "\
${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}"
INITSCRIPT_NAME = "crond"
INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "crontab"
do_install_append () {
install -d ${D}${sysconfdir}/sysconfig/
install -d ${D}${sysconfdir}/init.d/
install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
# below are necessary for a complete cron environment
install -d ${D}${localstatedir}/spool/cron
install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/
mkdir -p ${D}${sysconfdir}/cron.d
mkdir -p ${D}${sysconfdir}/cron.hourly
mkdir -p ${D}${sysconfdir}/cron.daily
mkdir -p ${D}${sysconfdir}/cron.weekly
mkdir -p ${D}${sysconfdir}/cron.monthly
touch ${D}${sysconfdir}/cron.deny
# below setting is necessary to allow normal user using crontab
# setgid for crontab binary
chown root:crontab ${D}/usr/bin/crontab
chmod 2755 ${D}/usr/bin/crontab
# allow 'crontab' group write to /var/spool/cron
chown root:crontab ${D}/var/spool/cron
chmod 770 ${D}/var/spool/cron
chmod 600 ${D}/etc/crontab
}
FILES_${PN} += "${sysconfdir}/cron*"
@@ -0,0 +1,70 @@
Upstream-Status: Inappropriate [embedded specific]
From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Sun, 30 Jan 2011 16:37:27 +0100
Subject: [PATCH] don't try to run generated binaries
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
ppdc/Makefile | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/ppdc/Makefile b/ppdc/Makefile
index 0288d47..fc87f1b 100644
--- a/ppdc/Makefile
+++ b/ppdc/Makefile
@@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \
$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \
$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
- echo Generating localization strings...
- ./genstrings >sample.c
+# echo Generating localization strings...
+# ./genstrings >sample.c
#
@@ -261,9 +261,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po
$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
- echo Testing PPD compiler...
- ./ppdc-static -l en,fr -I ../data foo.drv
- ./ppdc-static -l en,fr -z -I ../data foo.drv
+# echo Testing PPD compiler...
+# ./ppdc-static -l en,fr -I ../data foo.drv
+# ./ppdc-static -l en,fr -z -I ../data foo.drv
#
@@ -290,16 +290,16 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a
../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
echo Testing PPD importer...
- $(RM) -r ppd ppd2 sample-import.drv
- ./ppdc-static -I ../data sample.drv
- ./ppdi-static -I ../data -o sample-import.drv ppd/*
- ./ppdc-static -I ../data -d ppd2 sample-import.drv
- if diff -r ppd ppd2 >/dev/null; then \
- echo PPD import OK; \
- else \
- echo PPD import FAILED; \
- exit 1; \
- fi
+# $(RM) -r ppd ppd2 sample-import.drv
+# ./ppdc-static -I ../data sample.drv
+# ./ppdi-static -I ../data -o sample-import.drv ppd/*
+# ./ppdc-static -I ../data -d ppd2 sample-import.drv
+# if diff -r ppd ppd2 >/dev/null; then \
+# echo PPD import OK; \
+# else \
+# echo PPD import FAILED; \
+# exit 1; \
+# fi
#
--
1.6.6.1
@@ -0,0 +1,13 @@
Upstream-Status: Inappropriate [embedded specific]
--- a/init/cups.sh.in.orig 2008-10-04 16:50:46.000000000 -0300
+++ b/init/cups.sh.in 2008-10-04 16:51:39.000000000 -0300
@@ -68,7 +68,7 @@
ECHO_ERROR=:
;;
- Linux*)
+ DISABLELinux*)
IS_ON=/bin/true
if test -f /etc/init.d/functions; then
. /etc/init.d/functions
@@ -0,0 +1,93 @@
SUMMARY = "An Internet printing system for Unix"
DESCRIPTION = "An Internet printing system for Unix."
SECTION = "console/utils"
LICENSE = "GPLv2 LGPLv2"
DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib"
PROVIDES = "cups14"
SRC_URI = "ftp://ftp.easysw.com/pub/cups/${PV}/cups-${PV}-source.tar.bz2"
LEAD_SONAME = "libcupsdriver.so"
inherit autotools binconfig
EXTRA_OECONF = " \
--enable-gnutls \
--enable-dbus \
--enable-browsing \
--disable-openssl \
--disable-tiff \
--without-php \
--without-perl \
--without-python \
--without-java \
"
do_configure() {
gnu-configize
libtoolize --force
DSOFLAGS="${LDFLAGS}" oe_runconf
}
do_compile () {
sed -i s:STRIP:NOSTRIP: Makedefs
sed -i s:serial:: backend/Makefile
echo "all:" > man/Makefile
echo "libs:" >> man/Makefile
echo "install:" >> man/Makefile
echo "install-data:" >> man/Makefile
echo "install-exec:" >> man/Makefile
echo "install-headers:" >> man/Makefile
echo "install-libs:" >> man/Makefile
oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \
"LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \
"LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \
"LIBZ=-lz -L${STAGING_LIBDIR}" \
"-I."
}
fakeroot do_install () {
oe_runmake "DSTROOT=${D}" install
# This directory gets installed with perms 511, which makes packaging fail
chmod 0711 "${D}/${localstatedir}/run/cups/certs"
}
python do_package_append() {
# Change permissions back the way they were, they probably had a reason...
workdir = d.getVar('WORKDIR', 1)
os.system('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir)
}
PACKAGES =+ "${PN}-lib ${PN}-libimage"
FILES_${PN} += "${exec_prefix}/lib/cups/backend \
${exec_prefix}/lib/cups/cgi-bin \
${exec_prefix}/lib/cups/filter \
${exec_prefix}/lib/cups/monitor \
${exec_prefix}/lib/cups/notifier \
${exec_prefix}/lib/cups/daemon \
"
FILES_${PN}-lib = "${libdir}/libcups.so.*"
FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
FILES_${PN}-dbg += "${exec_prefix}/lib/cups/backend/.debug \
${exec_prefix}/lib/cups/cgi-bin/.debug \
${exec_prefix}/lib/cups/filter/.debug \
${exec_prefix}/lib/cups/monitor/.debug \
${exec_prefix}/lib/cups/notifier/.debug \
${exec_prefix}/lib/cups/daemon/.debug \
"
#package the html for the webgui inside the main packages (~1MB uncompressed)
FILES_${PN} += "${datadir}/doc/cups/images \
${datadir}/doc/cups/*html \
${datadir}/doc/cups/*.css \
${datadir}/icons/ \
"
@@ -0,0 +1,19 @@
require cups14.inc
PR = "r2"
DEPENDS += "libusb \
${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=956e7600195e6139f12de8c2a5bbefa9"
SRC_URI += " \
file://use_echo_only_in_init.patch \
file://0001-don-t-try-to-run-generated-binaries.patch \
"
SRC_URI[md5sum] = "de8fb5a29c36554925c0c6a6e2c0dae1"
SRC_URI[sha256sum] = "f08711702a77b52c7150f96fe1f45482f6151cb95ef601268c528607fe6ad514"
EXTRA_OECONF += " --disable-gssapi --enable-debug --disable-relro --enable-libusb \
${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf"
@@ -0,0 +1,18 @@
DESCRIPTION = "cwautomacros: a collection of autoconf m4 macros"
SECTION = "base"
HOMEPAGE = "http://cwautomacros.berlios.de/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
SRC_URI = http://download.berlios.de/cwautomacros/cwautomacros-${PV}.tar.bz2
PR = "r0"
SRC_URI[md5sum] = "074afcb50d0a8bff10786a2954b2b02d"
SRC_URI[sha256sum] = "3115603b891f3a163c0bbb5fea2f3742113a183fa6745ee5e89e5f6d0e9f6121"
do_install() {
oe_runmake CWAUTOMACROSPREFIX=${D}${prefix} install
}
BBCLASSEXTEND = "native"
@@ -0,0 +1,26 @@
SUMMARY = "Diffutils contains tools used for finding differences between files."
DESCRIPTION = "Diffutils contains the GNU diff, diff3, \
sdiff, and cmp utilities. These programs are usually \
used for creating patch files."
SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
PR = "r4"
SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz"
SRC_URI[md5sum] = "71f9c5ae19b60608f6c7f162da86a428"
SRC_URI[sha256sum] = "c5001748b069224dd98bf1bb9ee877321c7de8b332c8aad5af3e2a7372d23f5a"
inherit autotools update-alternatives gettext
# diffutils assumes non-glibc compilation with uclibc and
# this causes it to generate its own implementations of
# standard functionality. regex.c actually breaks compilation
# because it uses __mempcpy, there are other things (TBD:
# see diffutils.mk in buildroot)
EXTRA_OECONF_libc-uclibc = "--without-included-regex"
ALTERNATIVE_LINKS = "${bindir}/diff ${bindir}/cmp"
ALTERNATIVE_PRIORITY = "100"
@@ -0,0 +1,25 @@
DESCRIPTION = "Diffutils contains the GNU diff, diff3, \
sdiff, and cmp utilities. These programs are usually \
used for creating patch files."
SECTION = "base"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
PR = "r0"
SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz"
inherit autotools update-alternatives gettext
# diffutils assumes non-glibc compilation with uclibc and
# this causes it to generate its own implementations of
# standard functionality. regex.c actually breaks compilation
# because it uses __mempcpy, there are other things (TBD:
# see diffutils.mk in buildroot)
EXTRA_OECONF_libc-uclibc = "--without-included-regex"
ALTERNATIVE_LINKS = "${bindir}/diff ${bindir}/cmp"
ALTERNATIVE_PRIORITY = "100"
SRC_URI[md5sum] = "22e4deef5d8949a727b159d6bc65c1cc"
SRC_URI[sha256sum] = "2aaaebef615be7dc365306a14caa5d273a4fc174f9f10abca8b60e082c054ed3"
@@ -0,0 +1,43 @@
http://lists.gnu.org/archive/html/bug-ed/2008-12/msg00001.html
2007-04-16 Mike Frysinger <vapier@gentoo.org>
* Do not set CC/CXX/CPPFLAGS/LDFLAGS to "" so that user can
override if they so choose.
* Only set CFLAGS/CXXFLAGS if user did not specify any.
ed had already taken GPLv3 when this patch out, so it should be GPLv3.
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Upstream-Status: Pending
Index: ed-1.5/configure
===================================================================
--- ed-1.5.orig/configure 2010-08-30 07:34:49.000000000 -0700
+++ ed-1.5/configure 2010-11-20 16:42:20.490645823 -0800
@@ -26,10 +26,6 @@
mandir='$(datadir)/man'
sysconfdir='$(prefix)/etc'
program_prefix=
-CC=
-CPPFLAGS=
-CFLAGS='-Wall -W -O2'
-LDFLAGS=
# Loop over all args
while [ -n "$1" ] ; do
@@ -105,6 +101,14 @@
esac
done
+# Defaults if the user did not select any
+if [ x"${CFLAGS+set}" != xset ] ; then
+ CFLAGS='-Wall -W -O2'
+fi
+if [ x"${CXXFLAGS+set}" != xset ] ; then
+ CXXFLAGS='-Wall -W -O2'
+fi
+
# Find the source files, if location was not specified.
srcdirtext=
if [ -z "${srcdir}" ] ; then
@@ -0,0 +1,21 @@
DESCRIPTION = "GNU ed is a line-oriented text editor"
HOMEPAGE = "http://www.gnu.org/software/ed/"
SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \
file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e"
PR = "r2"
SRC_URI = "http://download.savannah.gnu.org/releases-noredirect/ed/ed-${PV}.tar.bz2"
SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e"
inherit autotools
EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-dependency-tracking', ' ')}"
CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-silent-rules', ' ')}"
@@ -0,0 +1,28 @@
DESCRIPTION = "a line-oriented text editor"
HOMEPAGE = "http://www.gnu.org/software/ed/"
BUGTRACKER = ""
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
file://ed.h;endline=20;md5=c708cda1b2e8d723d458690b7db03878 \
file://main.c;endline=24;md5=1bd039d59e04ee5f82adcc970144a2c3"
SECTION = "base"
PR = "r0"
# LSB states that ed should be in /bin/
bindir = "${base_bindir}"
SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.gz \
file://ed-1.2-build.patch"
SRC_URI[md5sum] = "9a78593decccaa889523aa4bb555ed4b"
SRC_URI[sha256sum] = "211c67b0c4aae277d34b1c5f842db1952e468e5905142868e4718ac838f08a65"
do_configure() {
${S}/configure
}
do_install() {
oe_runmake 'DESTDIR=${D}' install
}
@@ -0,0 +1,15 @@
SUMMARY = "Display or change ethernet card settings"
DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
HOMEPAGE = "http://sourceforge.net/projects/gkernel/"
SECTION = "console/network"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://ethtool.c;firstline=4;endline=16;md5=6db6b005b8390ea76cb85a2c7bda8e6b"
PR = "r0"
SRC_URI = "${SOURCEFORGE_MIRROR}/gkernel/ethtool-${PV}.tar.gz"
SRC_URI[md5sum] = "3b2322695e9ee7bf447ebcdb85f93e83"
SRC_URI[sha256sum] = "639622180fe48dc7bb117ffbf263395d7ae47aac9819b8d9f83ff053ecf17bdd"
inherit autotools
@@ -0,0 +1,56 @@
Upstream-Status: Inappropriate [legacy version]
the old AC_USE_SYSTEM_EXTENSIONS won't work with AC_GNU_SOURCE
against 4.2.31
07/08/2010 - qhe
diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4
index 143a9e5..0f27ceb 100644
--- a/gnulib/m4/extensions.m4
+++ b/gnulib/m4/extensions.m4
@@ -12,44 +12,6 @@
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
-# AC_USE_SYSTEM_EXTENSIONS
-# ------------------------
-# Enable extensions on systems that normally disable them,
-# typically due to standards-conformance issues.
-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-[
- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
- AC_BEFORE([$0], [AC_RUN_IFELSE])
-
- AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([AC_AIX])
- AC_REQUIRE([AC_MINIX])
-
- AH_VERBATIM([__EXTENSIONS__],
-[/* Enable extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif])
- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
- [ac_cv_safe_to_define___extensions__],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([
-# define __EXTENSIONS__ 1
- AC_INCLUDES_DEFAULT])],
- [ac_cv_safe_to_define___extensions__=yes],
- [ac_cv_safe_to_define___extensions__=no])])
- test $ac_cv_safe_to_define___extensions__ = yes &&
- AC_DEFINE([__EXTENSIONS__])
- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
- AC_DEFINE([_TANDEM_SOURCE])
-])
-
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,
@@ -0,0 +1,781 @@
Upstream-Status: Backport
commit af974034b68bf59337c7a384e488a518a77dfecd
Author: James Youngman <jay@gnu.org>
Date: Sat Jul 11 19:55:27 2009 +0100
Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit coredump.
Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
coredumps.
* find/tree.c (set_new_parent): Initialise struct
predicate->arg_text to NULL (instead of leaving it uninitialised).
(get_new_pred_noarg): Likewise.
(get_new_pred): Initialise predicate->arg_text to
"ThisShouldBeSetToSomethingElse" to make it easier to notice
bugs.
(get_new_pred_chk_op): Use get_new_pred_noarg.
(print_predicate): Use an if statement instead of
two ternary operators.
* find/util.c (insert_primary_withpred): Accept new argument, arg,
being the argument (if any) of this predicate. Pass it to
get_new_pred_chk_op.
(insert_primary): Likewise (pass arg to insert_primary_withpred).
(insert_primary_noarg): New function; calls insert_primary with
arg=NULL.
* find/parser.c (collect_arg_stat_info): Add an output parameter;
the filename from which we collected the stat information.
(parse_closeparen, parse_delete, parse_and, parse_or,
parse_comma): Use get_new_pred_noarg.
(parse_cnewer, parse_newer, parse_anewer): Use new
collect_arg_stat_info and insert_primary interface.
(parse_print, parse_prune, parse_nouser, parse_empty): Use
insert_primary_noarg.
(parse_accesscheck, parse_false): Use insert_primary_noarg.
(parse_used, parse_iname, parse_fprint, insert_fprint,
parse_fstype, parse_ilname): Use new collect_arg and
insert_primary interfaces.
(parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
parse_perm, parse_size, parse_user, parse_time): Use new
collect_arg and insert_primary_withpred interface.
(parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
(parse_newerXY, parse_nogroup): Use new insert_primary interface.
(insert_regex, parse_samefile): Use new insert_primary_withpred
interface.
(insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
new insert_primary_withpred interface.
* find/defs.h (struct predicate.arg_text): make const.
Add declarations for new function get_new_pred_noarg and
insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
and insert_primary_withpred.
diff --git a/ChangeLog b/ChangeLog
index 6e346b8..e8ba0f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,0 +1,45 @@
+2009-07-11 James Youngman <jay@gnu.org>
+
+ Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
+ coredumps.
+ * find/tree.c (set_new_parent): Initialise struct
+ predicate->arg_text to NULL (instead of leaving it uninitialised).
+ (get_new_pred_noarg): Likewise.
+ (get_new_pred): Initialise predicate->arg_text to
+ "ThisShouldBeSetToSomethingElse" to make it easier to notice
+ bugs.
+ (get_new_pred_chk_op): Use get_new_pred_noarg.
+ (print_predicate): Use an if statement instead of
+ two ternary operators.
+ * find/util.c (insert_primary_withpred): Accept new argument, arg,
+ being the argument (if any) of this predicate. Pass it to
+ get_new_pred_chk_op.
+ (insert_primary): Likewise (pass arg to insert_primary_withpred).
+ (insert_primary_noarg): New function; calls insert_primary with
+ arg=NULL.
+ * find/parser.c (collect_arg_stat_info): Add an output parameter;
+ the filename from which we collected the stat information.
+ (parse_closeparen, parse_delete, parse_and, parse_or,
+ parse_comma): Use get_new_pred_noarg.
+ (parse_cnewer, parse_newer, parse_anewer): Use new
+ collect_arg_stat_info and insert_primary interface.
+ (parse_print, parse_prune, parse_nouser, parse_empty): Use
+ insert_primary_noarg.
+ (parse_accesscheck, parse_false): Use insert_primary_noarg.
+ (parse_used, parse_iname, parse_fprint, insert_fprint,
+ parse_fstype, parse_ilname): Use new collect_arg and
+ insert_primary interfaces.
+ (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
+ parse_perm, parse_size, parse_user, parse_time): Use new
+ collect_arg and insert_primary_withpred interface.
+ (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
+ (parse_newerXY, parse_nogroup): Use new insert_primary interface.
+ (insert_regex, parse_samefile): Use new insert_primary_withpred
+ interface.
+ (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
+ new insert_primary_withpred interface.
+ * find/defs.h (struct predicate.arg_text): make const.
+ Add declarations for new function get_new_pred_noarg and
+ insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
+ and insert_primary_withpred.
+
diff --git a/find/defs.h b/find/defs.h
index 1708d83..4539fd9 100644
--- a/find/defs.h
+++ b/find/defs.h
@@ -297,7 +297,7 @@ struct predicate
boolean artificial;
/* The raw text of the argument of this predicate. */
- char *arg_text;
+ const char *arg_text;
/* Information needed by the predicate processor.
Next to each member are listed the predicates that use it. */
@@ -480,13 +480,16 @@ void show_success_rates(const struct predicate *node);
/* tree.c */
struct predicate * build_expression_tree PARAMS((int argc, char *argv[], int end_of_leading_options));
struct predicate * get_eval_tree PARAMS((void));
+struct predicate *get_new_pred_noarg (const struct parser_table *entry);
struct predicate *get_new_pred PARAMS((const struct parser_table *entry));
-struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry));
+struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry,
+ const char *arg));
float calculate_derived_rates PARAMS((struct predicate *p));
/* util.c */
-struct predicate *insert_primary PARAMS((const struct parser_table *entry));
-struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr));
+struct predicate *insert_primary PARAMS((const struct parser_table *entry, const char *arg));
+struct predicate *insert_primary_noarg PARAMS((const struct parser_table *entry));
+struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr, const char *arg));
void usage PARAMS((FILE *fp, int status, char *msg));
extern boolean check_nofollow(void);
void complete_pending_execs(struct predicate *p);
diff --git a/find/parser.c b/find/parser.c
index 534b670..2e6b989 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -640,11 +640,13 @@ collect_arg(char **argv, int *arg_ptr, const char **collected_arg)
}
static boolean
-collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p)
+collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p,
+ const char **argument)
{
const char *filename;
if (collect_arg(argv, arg_ptr, &filename))
{
+ *argument = filename;
if (0 == (options.xstat)(filename, p))
{
return true;
@@ -656,6 +658,7 @@ collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p)
}
else
{
+ *argument = NULL;
return false;
}
}
@@ -679,7 +682,7 @@ parse_and (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) argv;
(void) arg_ptr;
- our_pred = get_new_pred (entry);
+ our_pred = get_new_pred_noarg (entry);
our_pred->pred_func = pred_and;
our_pred->p_type = BI_OP;
our_pred->p_prec = AND_PREC;
@@ -691,11 +694,12 @@ static boolean
parse_anewer (const struct parser_table* entry, char **argv, int *arg_ptr)
{
struct stat stat_newer;
+ const char *arg;
set_stat_placeholders(&stat_newer);
- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
{
- struct predicate *our_pred = insert_primary (entry);
+ struct predicate *our_pred = insert_primary (entry, arg);
our_pred->args.reftime.xval = XVAL_ATIME;
our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
our_pred->args.reftime.kind = COMP_GT;
@@ -713,7 +717,7 @@ parse_closeparen (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) argv;
(void) arg_ptr;
- our_pred = get_new_pred (entry);
+ our_pred = get_new_pred_noarg (entry);
our_pred->pred_func = pred_closeparen;
our_pred->p_type = CLOSE_PAREN;
our_pred->p_prec = NO_PREC;
@@ -725,11 +729,12 @@ static boolean
parse_cnewer (const struct parser_table* entry, char **argv, int *arg_ptr)
{
struct stat stat_newer;
+ const char *arg;
set_stat_placeholders(&stat_newer);
- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
{
- struct predicate *our_pred = insert_primary (entry);
+ struct predicate *our_pred = insert_primary (entry, arg);
our_pred->args.reftime.xval = XVAL_CTIME; /* like -newercm */
our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
our_pred->args.reftime.kind = COMP_GT;
@@ -747,7 +752,7 @@ parse_comma (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) argv;
(void) arg_ptr;
- our_pred = get_new_pred (entry);
+ our_pred = get_new_pred_noarg (entry);
our_pred->pred_func = pred_comma;
our_pred->p_type = BI_OP;
our_pred->p_prec = COMMA_PREC;
@@ -786,7 +791,7 @@ parse_delete (const struct parser_table* entry, char *argv[], int *arg_ptr)
(void) argv;
(void) arg_ptr;
- our_pred = insert_primary (entry);
+ our_pred = insert_primary_noarg (entry);
our_pred->side_effects = our_pred->no_default_print = true;
/* -delete implies -depth */
options.do_dir_first = false;
@@ -831,7 +836,7 @@ parse_empty (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) argv;
(void) arg_ptr;
- our_pred = insert_primary (entry);
+ our_pred = insert_primary_noarg (entry);
our_pred->est_success_rate = 0.01f; /* assume 1% of files are empty. */
return true;
}
@@ -856,7 +861,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) argv;
(void) arg_ptr;
- our_pred = insert_primary (entry);
+ our_pred = insert_primary_noarg (entry);
our_pred->need_stat = our_pred->need_type = false;
our_pred->side_effects = our_pred->no_default_print = false;
our_pred->est_success_rate = 0.0f;
@@ -866,7 +871,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
static boolean
insert_fls (const struct parser_table* entry, const char *filename)
{
- struct predicate *our_pred = insert_primary (entry);
+ struct predicate *our_pred = insert_primary_noarg (entry);
if (filename)
open_output_file (filename, &our_pred->args.printf_vec);
else
@@ -899,7 +904,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
const char *filename;
if (collect_arg(argv, arg_ptr, &filename))
{
- our_pred = insert_primary (entry);
+ our_pred = insert_primary (entry, filename);
open_output_file (filename, &our_pred->args.printf_vec);
our_pred->side_effects = our_pred->no_default_print = true;
our_pred->need_stat = our_pred->need_type = false;
@@ -915,7 +920,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
static boolean
insert_fprint(const struct parser_table* entry, const char *filename)
{
- struct predicate *our_pred = insert_primary (entry);
+ struct predicate *our_pred = insert_primary (entry, filename);
if (filename)
open_output_file (filename, &our_pred->args.printf_vec);
else
@@ -960,7 +965,7 @@ parse_fstype (const struct parser_table* entry, char **argv, int *arg_ptr)
const char *typename;
if (collect_arg(argv, arg_ptr, &typename))
{
- struct predicate *our_pred = insert_primary (entry);
+ struct predicate *our_pred = insert_primary (entry, typename);
our_pred->args.str = typename;
/* This is an expensive operation, so although there are
@@ -1090,7 +1095,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
return false;
}
}
- our_pred = insert_primary (entry);
+ our_pred = insert_primary (entry, groupname);
our_pred->args.gid = gid;
our_pred->est_success_rate = (our_pred->args.numinfo.l_val < 100) ? 0.99 : 0.2;
return true;
@@ -1160,7 +1165,7 @@ parse_ilname (const struct parser_table* entry, char **argv, int *arg_ptr)
const char *name;
if (collect_arg(argv, arg_ptr, &name))
{
- struct predicate *our_pred = insert_primary (entry);
+ struct predicate *our_pred = insert_primary (entry, name);
our_pred->args.str = name;
/* Use the generic glob pattern estimator to figure out how many
* links will match, but bear in mind that most files won't be links.
@@ -1227,7 +1232,7 @@ parse_iname (const struct parser_table* entry, char **argv, int *arg_ptr)
{
if (check_name_arg("-iname", name))
{
- struct predicate *our_pred = insert_primary (entry);
+ struct predicate *our_pred = insert_primary (entry, name);
our_pred->need_stat = our_pred->need_type = false;
our_pred->args.str = name;
our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
@@ -1268,7 +1273,7 @@ parse_ipath (const struct parser_table* entry, char **argv, int *arg_ptr)
fnmatch_sanitycheck ();
if (collect_arg (argv, arg_ptr, &name))
{
- struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath);
+ struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath, name);
our_pred->need_stat = our_pred->need_type = false;
our_pred->args.str = name;
our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
@@ -1316,7 +1321,7 @@ parse_lname (const struct parser_table* entry, char **argv, int *arg_ptr)
fnmatch_sanitycheck();
if (collect_arg(argv, arg_ptr, &name))
{
- struct predicate *our_pred = insert_primary (entry);
+ struct predicate *our_pred = insert_primary (entry, name);
our_pred->args.str = name;
our_pred->est_success_rate = 0.1 * estimate_pattern_match_rate(name, 0);
return true;
@@ -1391,7 +1396,7 @@ do_parse_xmin (const struct parser_table* entry,
"arithmetic overflow while converting %s "
"minutes to a number of seconds"))
{
- struct predicate *our_pred = insert_primary (entry);
+ struct predicate *our_pred = insert_primary (entry, minutes);
our_pred->args.reftime = tval;
our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
return true;
@@ -1427,7 +1432,7 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
fnmatch_sanitycheck();
if (check_name_arg("-name", name))
{
- struct predicate *our_pred = insert_primary (entry);
+ struct predicate *our_pred = insert_primary (entry, name);
our_pred->need_stat = our_pred->need_type = false;
our_pred->args.str = name;
our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
@@ -1445,7 +1450,7 @@ parse_negate (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) &argv;
(void) &arg_ptr;
- our_pred = get_new_pred_chk_op (entry);
+ our_pred = get_new_pred_chk_op (entry, NULL);
our_pred->pred_func = pred_negate;
our_pred->p_type = UNI_OP;
our_pred->p_prec = NEGATE_PREC;
@@ -1458,11 +1463,12 @@ parse_newer (const struct parser_table* entry, char **argv, int *arg_ptr)
{
struct predicate *our_pred;
struct stat stat_newer;
+ const char *arg;
set_stat_placeholders(&stat_newer);
- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
{
- our_pred = insert_primary (entry);
+ our_pred = insert_primary (entry, arg);
our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
our_pred->args.reftime.xval = XVAL_MTIME;
our_pred->args.reftime.kind = COMP_GT;
@@ -1530,7 +1536,7 @@ parse_newerXY (const struct parser_table* entry, char **argv, int *arg_ptr)
(*arg_ptr)++;
}
- our_pred = insert_primary (entry);
+ our_pred = insert_primary (entry, argv[*arg_ptr]);
switch (x)
@@ -1623,7 +1629,7 @@ parse_nogroup (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) &argv;
(void) &arg_ptr;
- our_pred = insert_primary (entry);
+ our_pred = insert_primary (entry, NULL);
our_pred->est_success_rate = 1e-4;
#ifdef CACHE_IDS
if (gid_unused == NULL)
@@ -1660,7 +1666,7 @@ parse_nouser (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) arg_ptr;
- our_pred = insert_primary (entry);
+ our_pred = insert_primary_noarg (entry);
our_pred->est_success_rate = 1e-3;
#ifdef CACHE_IDS
if (uid_unused == NULL)
@@ -1716,7 +1722,7 @@ parse_openparen (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) argv;
(void) arg_ptr;
- our_pred = get_new_pred_chk_op (entry);
+ our_pred = get_new_pred_chk_op (entry, NULL);
our_pred->pred_func = pred_openparen;
our_pred->p_type = OPEN_PAREN;
our_pred->p_prec = NO_PREC;
@@ -1732,7 +1738,7 @@ parse_or (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) argv;
(void) arg_ptr;
- our_pred = get_new_pred (entry);
+ our_pred = get_new_pred_noarg (entry);
our_pred->pred_func = pred_or;
our_pred->p_type = BI_OP;
our_pred->p_prec = OR_PREC;
@@ -1756,7 +1762,7 @@ parse_path (const struct parser_table* entry, char **argv, int *arg_ptr)
const char *name;
if (collect_arg(argv, arg_ptr, &name))
{
- struct predicate *our_pred = insert_primary_withpred (entry, pred_path);
+ struct predicate *our_pred = insert_primary_withpred (entry, pred_path, name);
our_pred->need_stat = our_pred->need_type = false;
our_pred->args.str = name;
our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
@@ -1894,7 +1900,7 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
rate = 0.9986; /* probably matches anything but a broken symlink */
}
- our_pred = insert_primary (entry);
+ our_pred = insert_primary (entry, perm_expr);
our_pred->est_success_rate = rate;
if (havekind)
{
@@ -1928,7 +1934,7 @@ parse_print (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) argv;
(void) arg_ptr;
- our_pred = insert_primary (entry);
+ our_pred = insert_primary_noarg (entry);
/* -print has the side effect of printing. This prevents us
from doing undesired multiple printing when the user has
already specified -print. */
@@ -1981,7 +1987,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) argv;
(void) arg_ptr;
- our_pred = insert_primary (entry);
+ our_pred = insert_primary_noarg (entry);
if (options.do_dir_first == false)
our_pred->need_stat = our_pred->need_type = false;
/* -prune has a side effect that it does not descend into
@@ -1994,7 +2000,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
static boolean
parse_quit (const struct parser_table* entry, char **argv, int *arg_ptr)
{
- struct predicate *our_pred = insert_primary (entry);
+ struct predicate *our_pred = insert_primary_noarg (entry);
(void) argv;
(void) arg_ptr;
our_pred->need_stat = our_pred->need_type = false;
@@ -2036,7 +2042,7 @@ insert_regex (char **argv,
{
struct re_pattern_buffer *re;
const char *error_message;
- struct predicate *our_pred = insert_primary_withpred (entry, pred_regex);
+ struct predicate *our_pred = insert_primary_withpred (entry, pred_regex, rx);
our_pred->need_stat = our_pred->need_type = false;
re = xmalloc (sizeof (struct re_pattern_buffer));
our_pred->args.regex = re;
@@ -2061,6 +2067,7 @@ static boolean
parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
{
struct predicate *our_pred;
+ char *arg;
uintmax_t num;
char suffix;
enum comparison_type c_type;
@@ -2073,42 +2080,43 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
*/
if ((argv == NULL) || (argv[*arg_ptr] == NULL))
return false;
+ arg = argv[*arg_ptr];
- len = strlen (argv[*arg_ptr]);
+ len = strlen (arg);
if (len == 0)
error (1, 0, _("invalid null argument to -size"));
- suffix = argv[*arg_ptr][len - 1];
+ suffix = arg[len - 1];
switch (suffix)
{
case 'b':
blksize = 512;
- argv[*arg_ptr][len - 1] = '\0';
+ arg[len - 1] = '\0';
break;
case 'c':
blksize = 1;
- argv[*arg_ptr][len - 1] = '\0';
+ arg[len - 1] = '\0';
break;
case 'k':
blksize = 1024;
- argv[*arg_ptr][len - 1] = '\0';
+ arg[len - 1] = '\0';
break;
case 'M': /* Megabytes */
blksize = 1024*1024;
- argv[*arg_ptr][len - 1] = '\0';
+ arg[len - 1] = '\0';
break;
case 'G': /* Gigabytes */
blksize = 1024*1024*1024;
- argv[*arg_ptr][len - 1] = '\0';
+ arg[len - 1] = '\0';
break;
case 'w':
blksize = 2;
- argv[*arg_ptr][len - 1] = '\0';
+ arg[len - 1] = '\0';
break;
case '0':
@@ -2127,14 +2135,14 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
error (1, 0, _("invalid -size type `%c'"), argv[*arg_ptr][len - 1]);
}
/* TODO: accept fractional megabytes etc. ? */
- if (!get_num (argv[*arg_ptr], &num, &c_type))
+ if (!get_num (arg, &num, &c_type))
{
error(1, 0,
_("Invalid argument `%s%c' to -size"),
- argv[*arg_ptr], (int)suffix);
+ arg, (int)suffix);
return false;
}
- our_pred = insert_primary (entry);
+our_pred = insert_primary (entry, arg);
our_pred->args.size.kind = c_type;
our_pred->args.size.blocksize = blksize;
our_pred->args.size.size = num;
@@ -2162,9 +2170,10 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
struct predicate *our_pred;
struct stat st, fst;
int fd, openflags;
+ const char *filename;
set_stat_placeholders(&st);
- if (!collect_arg_stat_info(argv, arg_ptr, &st))
+ if (!collect_arg_stat_info(argv, arg_ptr, &st, &filename))
return false;
set_stat_placeholders(&fst);
@@ -2289,7 +2298,7 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
}
}
- our_pred = insert_primary (entry);
+ our_pred = insert_primary (entry, filename);
our_pred->args.samefileid.ino = st.st_ino;
our_pred->args.samefileid.dev = st.st_dev;
our_pred->args.samefileid.fd = fd;
@@ -2350,7 +2359,7 @@ parse_true (const struct parser_table* entry, char **argv, int *arg_ptr)
(void) argv;
(void) arg_ptr;
- our_pred = insert_primary (entry);
+ our_pred = insert_primary_noarg (entry);
our_pred->need_stat = our_pred->need_type = false;
our_pred->est_success_rate = 1.0f;
return true;
@@ -2369,7 +2378,7 @@ parse_accesscheck (const struct parser_table* entry, char **argv, int *arg_ptr)
struct predicate *our_pred;
(void) argv;
(void) arg_ptr;
- our_pred = insert_primary (entry);
+ our_pred = insert_primary_noarg (entry);
our_pred->need_stat = our_pred->need_type = false;
our_pred->side_effects = our_pred->no_default_print = false;
if (pred_is(our_pred, pred_executable))
@@ -2414,7 +2423,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
struct timespec zero = {0,0};
if (get_relative_timestamp(offset_str, &tval, zero, DAYSECS, errmsg))
{
- our_pred = insert_primary (entry);
+ our_pred = insert_primary (entry, offset_str);
our_pred->args.reftime = tval;
our_pred->est_success_rate = estimate_file_age_success_rate(tval.ts.tv_sec / DAYSECS);
return true;
@@ -2472,7 +2481,7 @@ parse_user (const struct parser_table* entry, char **argv, int *arg_ptr)
return false;
}
}
- our_pred = insert_primary (entry);
+ our_pred = insert_primary (entry, username);
our_pred->args.uid = uid;
our_pred->est_success_rate = (our_pred->args.uid < 100) ? 0.99 : 0.2;
return true;
@@ -2650,7 +2659,7 @@ insert_type (char **argv, int *arg_ptr,
error(1, 0, _("Unknown argument to -type: %c"), (*typeletter));
return false;
}
- our_pred = insert_primary_withpred (entry, which_pred);
+ our_pred = insert_primary_withpred (entry, which_pred, typeletter);
our_pred->est_success_rate = rate;
/* Figure out if we will need to stat the file, because if we don't
@@ -2706,7 +2715,7 @@ insert_fprintf (struct format_val *vec,
struct segment **segmentp; /* Address of current segment. */
struct predicate *our_pred;
- our_pred = insert_primary_withpred (entry, func);
+ our_pred = insert_primary_withpred (entry, func, format_const);
our_pred->side_effects = our_pred->no_default_print = true;
our_pred->args.printf_vec = *vec;
our_pred->need_type = false;
@@ -3045,7 +3054,7 @@ new_insert_exec_ok (const char *action,
if ((argv == NULL) || (argv[*arg_ptr] == NULL))
return false;
- our_pred = insert_primary_withpred (entry, func);
+ our_pred = insert_primary_withpred (entry, func, "(some -exec* arguments)");
our_pred->side_effects = our_pred->no_default_print = true;
our_pred->need_type = our_pred->need_stat = false;
@@ -3374,7 +3383,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg))
return false;
- our_pred = insert_primary (entry);
+ our_pred = insert_primary (entry, orig_timearg);
our_pred->args.reftime = tval;
our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
@@ -3487,7 +3496,7 @@ insert_num (char **argv, int *arg_ptr, const struct parser_table *entry)
if (get_num (numstr, &num, &c_type))
{
- struct predicate *our_pred = insert_primary (entry);
+ struct predicate *our_pred = insert_primary (entry, numstr);
our_pred->args.numinfo.kind = c_type;
our_pred->args.numinfo.l_val = num;
diff --git a/find/tree.c b/find/tree.c
index 7420c60..60a0601 100644
--- a/find/tree.c
+++ b/find/tree.c
@@ -269,10 +269,14 @@ predicate_is_cost_free(const struct predicate *p)
/* Prints a predicate */
void print_predicate(FILE *fp, const struct predicate *p)
{
- fprintf (fp, "%s%s%s",
- p->p_name,
- p->arg_text ? " " : "",
- p->arg_text ? p->arg_text : "");
+ if (p->arg_text)
+ {
+ fprintf (fp, "%s %s", p->p_name, p->arg_text);
+ }
+ else
+ {
+ fprintf (fp, "%s", p->p_name);
+ }
}
@@ -832,7 +836,8 @@ set_new_parent (struct predicate *curr, enum predicate_precedence high_prec, str
new_parent->need_stat = false;
new_parent->need_type = false;
new_parent->p_cost = NeedsNothing;
-
+ new_parent->arg_text = NULL;
+
switch (high_prec)
{
case COMMA_PREC:
@@ -1393,6 +1398,18 @@ init_pred_perf(struct predicate *pred)
p->visits = p->successes = 0;
}
+
+struct predicate *
+get_new_pred_noarg (const struct parser_table *entry)
+{
+ struct predicate *p = get_new_pred(entry);
+ if (p)
+ {
+ p->arg_text = NULL;
+ }
+ return p;
+}
+
/* Return a pointer to a new predicate structure, which has been
linked in as the last one in the predicates list.
@@ -1433,6 +1450,8 @@ get_new_pred (const struct parser_table *entry)
last_pred->no_default_print = false;
last_pred->need_stat = true;
last_pred->need_type = true;
+ last_pred->p_cost = NeedsUnknown;
+ last_pred->arg_text = "ThisShouldBeSetToSomethingElse";
last_pred->args.str = NULL;
last_pred->pred_next = NULL;
last_pred->pred_left = NULL;
@@ -1449,7 +1468,8 @@ get_new_pred (const struct parser_table *entry)
predicate is an operator. If it isn't, the AND operator is inserted. */
struct predicate *
-get_new_pred_chk_op (const struct parser_table *entry)
+get_new_pred_chk_op (const struct parser_table *entry,
+ const char *arg)
{
struct predicate *new_pred;
static const struct parser_table *entry_and = NULL;
@@ -1471,13 +1491,14 @@ get_new_pred_chk_op (const struct parser_table *entry)
case PRIMARY_TYPE:
case CLOSE_PAREN:
/* We need to interpose the and operator. */
- new_pred = get_new_pred (entry_and);
+ new_pred = get_new_pred_noarg (entry_and);
new_pred->pred_func = pred_and;
new_pred->p_name = "-a";
new_pred->p_type = BI_OP;
new_pred->p_prec = AND_PREC;
new_pred->need_stat = false;
new_pred->need_type = false;
+ new_pred->arg_text = NULL;
new_pred->args.str = NULL;
new_pred->side_effects = false;
new_pred->no_default_print = false;
@@ -1488,6 +1509,7 @@ get_new_pred_chk_op (const struct parser_table *entry)
}
new_pred = get_new_pred (entry);
+ new_pred->arg_text = arg;
new_pred->parser_entry = entry;
return new_pred;
}
diff --git a/find/util.c b/find/util.c
index a06eada..cc9a3eb 100644
--- a/find/util.c
+++ b/find/util.c
@@ -89,11 +89,13 @@ static struct debug_option_assoc debugassoc[] =
operator. */
struct predicate *
-insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func)
+insert_primary_withpred (const struct parser_table *entry,
+ PRED_FUNC pred_func,
+ const char *arg)
{
struct predicate *new_pred;
- new_pred = get_new_pred_chk_op (entry);
+ new_pred = get_new_pred_chk_op (entry, arg);
new_pred->pred_func = pred_func;
new_pred->p_name = entry->parser_name;
new_pred->args.str = NULL;
@@ -118,10 +120,16 @@ insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func)
either not there at all (we are the very first node) or is an
operator. */
struct predicate *
-insert_primary (const struct parser_table *entry)
+insert_primary (const struct parser_table *entry, const char *arg)
{
assert (entry->pred_func != NULL);
- return insert_primary_withpred(entry, entry->pred_func);
+ return insert_primary_withpred(entry, entry->pred_func, arg);
+}
+
+struct predicate *
+insert_primary_noarg (const struct parser_table *entry)
+{
+ return insert_primary(entry, NULL);
}
@@ -0,0 +1,294 @@
Upstream-Status: Backport
commit 76ed377d6d3e4a83a00cabd401f751b37ecd1e7b
Author: James Youngman <jay@gnu.org>
Date: Sat Feb 20 13:11:45 2010 +0000
Fix Savannah bug# 28824: "-ctime x" yields "missing argument to `-ctime'".
* find/parser.c (parse_fls): If the argument is invalid, reverse
the change that collect_arg() made to *arg_ptr (that is, don't
consume the argument).
(parse_fprint0): Likewise.
(parse_gid): Likewise.
(parse_group): Likewise.
(parse_inum): Likewise.
(parse_links): Likewise.
(do_parse_xmin): Likewise.
(parse_name): Likewise.
(parse_printf): Likewise.
(parse_uid): Likewise.
(parse_used): Likewise.
(parse_time): Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
diff --git a/ChangeLog b/ChangeLog
index d0ce1fe..13539a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,0 +1,19 @@
+2010-02-20 James Youngman <jay@gnu.org>
+
+ Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
+ `-ctime'".
+ * find/parser.c (parse_fls): If the argument is invalid, reverse
+ the change that collect_arg() made to *arg_ptr (that is, don't
+ consume the argument).
+ (parse_fprint0): Likewise.
+ (parse_gid): Likewise.
+ (parse_group): Likewise.
+ (parse_inum): Likewise.
+ (parse_links): Likewise.
+ (do_parse_xmin): Likewise.
+ (parse_name): Likewise.
+ (parse_printf): Likewise.
+ (parse_uid): Likewise.
+ (parse_used): Likewise.
+ (parse_time): Likewise.
+
diff --git a/NEWS b/NEWS
index 5394311..4e910df 100644
--- a/NEWS
+++ b/NEWS
@@ -4,5 +4,8 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
** Bug Fixes
+#28824: Corrected error message for "-ctime x".
+ Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
+ -uid, -used, -atime, -mtime, -ctime.
#26537: find -prune now makes sure it has valid stat() information.
diff --git a/find/parser.c b/find/parser.c
index 2e6b989..08758ee 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -886,8 +886,14 @@ static boolean
parse_fls (const struct parser_table* entry, char **argv, int *arg_ptr)
{
const char *filename;
- return collect_arg(argv, arg_ptr, &filename)
- && insert_fls(entry, filename);
+ if (collect_arg(argv, arg_ptr, &filename))
+ {
+ if (insert_fls(entry, filename))
+ return true;
+ else
+ --*arg_ptr; /* don't consume the invalid arg. */
+ }
+ return false;
}
static boolean
@@ -937,9 +943,13 @@ parse_fprint0 (const struct parser_table* entry, char **argv, int *arg_ptr)
{
const char *filename;
if (collect_arg(argv, arg_ptr, &filename))
- return insert_fprint(entry, filename);
- else
- return false;
+ {
+ if (insert_fprint(entry, filename))
+ return true;
+ else
+ --*arg_ptr; /* don't consume the bad arg. */
+ }
+ return false;
}
static float estimate_fstype_success_rate(const char *fsname)
@@ -993,6 +1003,7 @@ parse_gid (const struct parser_table* entry, char **argv, int *arg_ptr)
}
else
{
+ --*arg_ptr; /* don't consume the invalid argument. */
return false;
}
}
@@ -1049,6 +1060,7 @@ static boolean
parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
{
const char *groupname;
+ const int saved_argc = *arg_ptr;
if (collect_arg(argv, arg_ptr, &groupname))
{
@@ -1077,6 +1089,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
"because it has the unexpected suffix %s"),
quotearg_n_style(0, options.err_quoting_style, groupname),
quotearg_n_style(1, options.err_quoting_style, groupname+gid_len));
+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
return false;
}
}
@@ -1092,6 +1105,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
{
error(1, 0, _("argument to -group is empty, but should be a group name"));
}
+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
return false;
}
}
@@ -1256,6 +1270,7 @@ parse_inum (const struct parser_table* entry, char **argv, int *arg_ptr)
}
else
{
+ --*arg_ptr; /* don't consume the invalid argument. */
return false;
}
}
@@ -1310,6 +1325,7 @@ parse_links (const struct parser_table* entry, char **argv, int *arg_ptr)
}
else
{
+ --*arg_ptr; /* don't consume the invalid argument. */
return false;
}
}
@@ -1358,6 +1374,7 @@ insert_depthspec(const struct parser_table* entry, char **argv, int *arg_ptr,
error(1, 0, _("Expected a positive decimal integer argument to %s, but got %s"),
predicate,
quotearg_n_style(0, options.err_quoting_style, depthstr));
+ /* NOTREACHED */
return false;
}
/* missing argument */
@@ -1385,6 +1402,7 @@ do_parse_xmin (const struct parser_table* entry,
enum xval xv)
{
const char *minutes;
+ const int saved_argc = *arg_ptr;
if (collect_arg(argv, arg_ptr, &minutes))
{
@@ -1401,6 +1419,11 @@ do_parse_xmin (const struct parser_table* entry,
our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
return true;
}
+ else
+ {
+ /* Don't consume the invalid argument. */
+ *arg_ptr = saved_argc;
+ }
}
return false;
}
@@ -1427,6 +1450,8 @@ static boolean
parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
{
const char *name;
+ const int saved_argc = *arg_ptr;
+
if (collect_arg(argv, arg_ptr, &name))
{
fnmatch_sanitycheck();
@@ -1438,6 +1463,10 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
return true;
}
+ else
+ {
+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
+ }
}
return false;
}
@@ -1954,11 +1983,21 @@ static boolean
parse_printf (const struct parser_table* entry, char **argv, int *arg_ptr)
{
const char *format;
+ const int saved_argc = *arg_ptr;
+
if (collect_arg(argv, arg_ptr, &format))
{
struct format_val fmt;
open_stdout(&fmt);
- return insert_fprintf (&fmt, entry, pred_fprintf, format);
+ if (insert_fprintf (&fmt, entry, pred_fprintf, format))
+ {
+ return true;
+ }
+ else
+ {
+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
+ return false;
+ }
}
return false;
}
@@ -1967,15 +2006,21 @@ static boolean
parse_fprintf (const struct parser_table* entry, char **argv, int *arg_ptr)
{
const char *format, *filename;
+ int saved_argc = *arg_ptr;
+
if (collect_arg(argv, arg_ptr, &filename))
{
if (collect_arg(argv, arg_ptr, &format))
{
struct format_val fmt;
open_output_file (filename, &fmt);
- return insert_fprintf (&fmt, entry, pred_fprintf, format);
+ saved_argc = *arg_ptr;
+
+ if (insert_fprintf (&fmt, entry, pred_fprintf, format))
+ return true;
}
}
+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
return false;
}
@@ -2405,6 +2450,7 @@ parse_uid (const struct parser_table* entry, char **argv, int *arg_ptr)
}
else
{
+ --*arg_ptr; /* don't consume the invalid argument. */
return false;
}
}
@@ -2431,6 +2477,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
else
{
error(1, 0, _("Invalid argument %s to -used"), offset_str);
+ /*NOTREACHED*/
return false;
}
}
@@ -2610,6 +2657,7 @@ insert_type (char **argv, int *arg_ptr,
if (strlen(typeletter) != 1u)
{
error(1, 0, _("Arguments to -type should contain only one letter"));
+ /*NOTREACHED*/
return false;
}
@@ -2657,6 +2705,7 @@ insert_type (char **argv, int *arg_ptr,
#endif
default: /* None of the above ... nuke 'em. */
error(1, 0, _("Unknown argument to -type: %c"), (*typeletter));
+ /*NOTREACHED*/
return false;
}
our_pred = insert_primary_withpred (entry, which_pred, typeletter);
@@ -3349,6 +3398,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
const char *errmsg = "arithmetic overflow while converting %s "
"days to a number of seconds";
struct timespec origin;
+ const int saved_argc = *arg_ptr;
if (!collect_arg(argv, arg_ptr, &timearg))
return false;
@@ -3381,7 +3431,10 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
timearg = orig_timearg;
if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg))
- return false;
+ {
+ *arg_ptr = saved_argc; /* don't consume the invalid argument */
+ return false;
+ }
our_pred = insert_primary (entry, orig_timearg);
our_pred->args.reftime = tval;
@@ -0,0 +1,58 @@
Upstream-Status: Backport
commit 5f5eb921765794e8fc58c4bdffa2daa2ae34800f
Author: James Youngman <jay@gnu.org>
Date: Sat Feb 20 19:53:13 2010 +0000
Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
* doc/find.texi (Problems with -exec and filenames): Add missing
$0 argument in example for sh -c 'something "$@" sh ...
* NEWS: Mention this change.
Signed-off-by: James Youngman <jay@gnu.org>
diff --git a/ChangeLog b/ChangeLog
index 13539a4..e94ba96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2010-02-20 James Youngman <jay@gnu.org>
+ Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
+ * doc/find.texi (Problems with -exec and filenames): Add missing
+ $0 argument in example for sh -c 'something "$@" sh ...
+ * NEWS: Mention this change.
+
Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
`-ctime'".
* find/parser.c (parse_fls): If the argument is invalid, reverse
diff --git a/NEWS b/NEWS
index 4e910df..4c97be9 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
** Bug Fixes
+#28872: Mistake in "#safer" example in "Problems with -exec and
+ filenames" section of the Texinfo manual.
+
#28824: Corrected error message for "-ctime x".
Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
-uid, -used, -atime, -mtime, -ctime.
diff --git a/doc/find.texi b/doc/find.texi
index 2e5958d..391ffa0 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -4830,8 +4830,8 @@ problem:
@example
# safer
-find -exec sh -c 'something "$@@"' @{@} \;
-find -execdir sh -c 'something "$@@"' @{@}\;
+find -exec sh -c 'something "$@@"' sh @{@} \;
+find -execdir sh -c 'something "$@@"' sh @{@}\;
@end example
This approach is not guaranteed to avoid every problem, but it is much
@@ -0,0 +1,40 @@
Upstream-Status: Pending
Author: H.J. Lu <hjl.tools@gmail.com>
Work around gnulib time_t assumption in findutils for x32
time_t is 64bit and long int is 32bit on x32. But gnulib used in
findutils assumes time_t values fit into long int. Such assumption is
invalid for x32 and should be removed.
This patch is a workaround to compile gnulib for x32.
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05
Index: findutils-4.4.2/gnulib/lib/getdate.y
===================================================================
--- findutils-4.4.2.orig/gnulib/lib/getdate.y
+++ findutils-4.4.2/gnulib/lib/getdate.y
@@ -114,7 +114,6 @@
wraps around, but there's no portable way to check for that at
compile-time. */
verify (TYPE_IS_INTEGER (time_t));
-verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX);
/* An integer value, and the number of digits in its textual
representation. */
Index: findutils-4.4.2/gnulib/lib/mktime.c
===================================================================
--- findutils-4.4.2.orig/gnulib/lib/mktime.c
+++ findutils-4.4.2/gnulib/lib/mktime.c
@@ -166,7 +166,7 @@ ydhms_diff (long int year1, long int yda
{
verify (C99_integer_division, -1 / 2 == 0);
verify (long_int_year_and_yday_are_wide_enough,
- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
+ INT_MAX <= TIME_T_MAX / 2 || TIME_T_MAX <= UINT_MAX);
/* Compute intervening leap days correctly even if year is negative.
Take care to avoid integer overflow here. */
@@ -0,0 +1,22 @@
SUMMARY = "find, locate, and xargs binaries."
DESCRIPTION = "The GNU Find Utilities are the basic directory searching utilities of the GNU operating system. \
These programs are typically used in conjunction with other programs to provide modular and powerful directory \
search and file locating capabilities to other commands."
HOMEPAGE = "http://www.gnu.org/software/findutils/"
BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
SECTION = "console/utils"
# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32)
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
SRC_URI = "${GNU_MIRROR}/findutils/findutils-${PV}.tar.gz"
inherit autotools gettext
# diffutils assumes non-glibc compilation with uclibc and
# this causes it to generate its own implementations of
# standard functionality. regex.c actually breaks compilation
# because it uses __mempcpy, there are other things (TBD:
# see diffutils.mk in buildroot)
EXTRA_OECONF_libc-uclibc = "--without-included-regex"
@@ -0,0 +1,43 @@
SUMMARY = "find, locate, and xargs binaries."
DESCRIPTION = "The GNU Find Utilities are the basic directory searching utilities of the GNU operating system. \
These programs are typically used in conjunction with other programs to provide modular and powerful directory \
search and file locating capabilities to other commands."
HOMEPAGE = "http://www.gnu.org/software/findutils/"
BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
SECTION = "console/utils"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
PR = "r1"
SRC_URI = "${GNU_MIRROR}/findutils/findutils-${PV}.tar.gz \
file://gnulib-extension.patch"
SRC_URI[md5sum] = "a0e31a0f18a49709bf5a449867c8049a"
SRC_URI[sha256sum] = "e0d34b8faca0b3cca0703f6c6b498afbe72f0ba16c35980c10ec9ef7724d6204"
inherit autotools gettext
# diffutils assumes non-glibc compilation with uclibc and
# this causes it to generate its own implementations of
# standard functionality. regex.c actually breaks compilation
# because it uses __mempcpy, there are other things (TBD:
# see diffutils.mk in buildroot)
EXTRA_OECONF_libc-uclibc = "--without-included-regex"
do_install_append () {
if [ -e ${D}${bindir}/find ]; then
mv ${D}${bindir}/find ${D}${bindir}/find.${PN}
mv ${D}${bindir}/xargs ${D}${bindir}/xargs.${PN}
fi
}
pkg_postinst_${PN} () {
for i in find xargs; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
}
pkg_prerm_${PN} () {
for i in find xargs; do update-alternatives --remove $i $i.${PN}; done
}
BBCLASSEXTEND = "native"
@@ -0,0 +1,31 @@
require findutils.inc
PR = "r2"
SRC_URI += "file://01-27017.patch \
file://02-28824.patch \
file://03-28872.patch \
file://findutils_fix_for_x32.patch "
SRC_URI[md5sum] = "351cc4adb07d54877fa15f75fb77d39f"
SRC_URI[sha256sum] = "434f32d171cbc0a5e72cfc5372c6fc4cb0e681f8dce566a0de5b6fccd702b62a"
# http://savannah.gnu.org/bugs/?27299
CACHED_CONFIGUREVARS += "${@base_contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}"
do_install_append () {
if [ -e ${D}${bindir}/find ]; then
mv ${D}${bindir}/find ${D}${bindir}/find.${PN}
mv ${D}${bindir}/xargs ${D}${bindir}/xargs.${PN}
fi
}
pkg_postinst_${PN} () {
for i in find xargs; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
}
pkg_prerm_${PN} () {
for i in find xargs; do update-alternatives --remove $i $i.${PN}; done
}
BBCLASSEXTEND = "native"
@@ -0,0 +1,39 @@
SUMMARY = "OpenPrinting printer support - filters"
DESCRIPTION = "Foomatic is a printer database designed to make it easier to set up \
common printers for use with UNIX-like operating systems.\
It provides the "glue" between a print spooler (like CUPS or lpr) and \
the printer, by processing files sent to the printer. \
\
This package consists of filters used by the printer spoolers \
to convert the incoming PostScript data into the printer's native \
format using a printer-specific, but spooler-independent PPD file. \
"
DEPENDS += "cups perl libxml2"
PR = "r2"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://${WORKDIR}/foomatic-filters-${PV}/COPYING;md5=393a5ca445f6965873eca0259a17f833"
SRC_URI = "http://www.openprinting.org/download/foomatic/foomatic-filters-${PV}.tar.gz"
SRC_URI[md5sum] = "20abd25c1c98b2dae68709062a132a7d"
SRC_URI[sha256sum] = "090313fae40b177f505d9c9b93d7a4d7188b6d5d18b6ae41ab24903ac983478d"
inherit autotools
EXTRA_OECONF += "--disable-file-converter-check --with-file-converter=texttops"
do_configure_prepend() {
export LIB_CUPS=${exec_prefix}/lib/cups # /usr/lib NOT libdir
export CUPS_BACKENDS=${exec_prefix}/lib/cups/backend # /usr/lib NOT libdir
export CUPS_FILTERS=${exec_prefix}/lib/cups/filter # /usr/lib NOT libdir
export CUPS_PPDS=${datadir}/cups/model
}
do_install_append_linuxstdbase() {
install -d ${D}${exec_prefix}/lib/cups/filter
ln -sf ${bindir}/foomatic-rip ${D}${exec_prefix}/lib/cups/filter
}
FILES_${PN}_append_linuxstdbase += "${exec_prefix}/lib/cups/filter/foomatic-rip"
@@ -0,0 +1,56 @@
Upstream-Status: Inappropriate [configuration]
--- /tmp/configure.in 2007-04-30 13:08:49.000000000 +0200
+++ gamin-0.1.8/configure.in 2007-04-30 13:10:53.285251000 +0200
@@ -354,51 +354,6 @@
AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
fi
-#### Abstract sockets
-
-AC_MSG_CHECKING(abstract socket namespace)
-AC_LANG_PUSH(C)
-AC_RUN_IFELSE([AC_LANG_PROGRAM(
-[[
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <errno.h>
-]],
-[[
- int listen_fd;
- struct sockaddr_un addr;
-
- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
-
- if (listen_fd < 0)
- {
- fprintf (stderr, "socket() failed: %s\n", strerror (errno));
- exit (1);
- }
-
- memset (&addr, '\0', sizeof (addr));
- addr.sun_family = AF_UNIX;
- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
- addr.sun_path[0] = '\0'; /* this is what makes it abstract */
-
- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
- {
- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
- strerror (errno));
- exit (1);
- }
- else
- exit (0);
-]])],
- [have_abstract_sockets=yes],
- [have_abstract_sockets=no])
-AC_LANG_POP(C)
-AC_MSG_RESULT($have_abstract_sockets)
-
if test x$enable_abstract_sockets = xyes; then
if test x$have_abstract_sockets = xno; then
AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
@@ -0,0 +1,59 @@
G_CONST_RETURN is deprecated in glib 2.30 so remove to to avoid
build failures.
RP 2011/10/12
Upstream-Status: Pending
Index: gamin-0.1.10/server/gam_node.c
===================================================================
--- gamin-0.1.10.orig/server/gam_node.c 2011-10-12 15:25:45.217178314 +0100
+++ gamin-0.1.10/server/gam_node.c 2011-10-12 15:26:17.807178293 +0100
@@ -122,7 +122,7 @@
* it has finished with the string. If it must keep it longer, it
* should makes its own copy. The returned string must not be freed.
*/
-G_CONST_RETURN char *
+const char *
gam_node_get_path(GamNode * node)
{
g_assert(node);
Index: gamin-0.1.10/server/gam_node.h
===================================================================
--- gamin-0.1.10.orig/server/gam_node.h 2011-10-12 15:25:46.857178269 +0100
+++ gamin-0.1.10/server/gam_node.h 2011-10-12 15:26:28.637178297 +0100
@@ -58,7 +58,7 @@
void gam_node_set_is_dir (GamNode *node,
gboolean is_dir);
-G_CONST_RETURN char *gam_node_get_path (GamNode *node);
+const char *gam_node_get_path (GamNode *node);
GList *gam_node_get_subscriptions (GamNode *node);
Index: gamin-0.1.10/server/gam_subscription.c
===================================================================
--- gamin-0.1.10.orig/server/gam_subscription.c 2011-10-12 15:25:40.497177525 +0100
+++ gamin-0.1.10/server/gam_subscription.c 2011-10-12 15:26:39.867178304 +0100
@@ -141,7 +141,7 @@
* @param sub the GamSubscription
* @returns The path being monitored. It should not be freed.
*/
-G_CONST_RETURN char *
+const char *
gam_subscription_get_path(GamSubscription * sub)
{
if (sub == NULL)
Index: gamin-0.1.10/server/gam_subscription.h
===================================================================
--- gamin-0.1.10.orig/server/gam_subscription.h 2011-10-12 15:25:28.507178266 +0100
+++ gamin-0.1.10/server/gam_subscription.h 2011-10-12 15:25:58.817178285 +0100
@@ -21,7 +21,7 @@
int gam_subscription_get_reqno (GamSubscription *sub);
-G_CONST_RETURN char *gam_subscription_get_path (GamSubscription *sub);
+const char *gam_subscription_get_path (GamSubscription *sub);
GamListener *gam_subscription_get_listener (GamSubscription *sub);
@@ -0,0 +1,34 @@
SUMMARY = "Gamin the File Alteration Monitor"
DESCRIPTION = "Gamin is a file and directory monitoring system defined to \
be a subset of the FAM (File Alteration Monitor) system."
HOMEPAGE = "http://people.gnome.org/~veillard/gamin/"
LICENSE = "LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=412a9be54757a155d0b997b52b519f62"
DEPENDS = "glib-2.0"
PROVIDES = "fam"
PR = "r4"
SRC_URI = "http://www.gnome.org/~veillard/gamin/sources/gamin-${PV}.tar.gz \
file://no-abstract-sockets.patch \
file://noconst.patch"
SRC_URI[md5sum] = "b4ec549e57da470c04edd5ec2876a028"
SRC_URI[sha256sum] = "28085f0ae8be10eab582ff186af4fb0be92cc6c62b5cc19cd09b295c7c2899a1"
inherit autotools pkgconfig
EXTRA_OECONF = "--without-python"
PACKAGES += "lib${BPN} lib${BPN}-dev"
FILES_${PN} = "${libexecdir}"
FILES_${PN}-dbg += "${libexecdir}/.debug"
FILES_lib${BPN} = "${libdir}/lib*.so.*"
FILES_lib${BPN}-dev = "${includedir} ${libdir}/pkgconfig ${libdir}/lib*.la \
${libdir}/lib*.a ${libdir}/lib*.so"
RDEPENDS_lib${BPN} = "${PN}"
LEAD_SONAME = "libgamin-1.so"
@@ -0,0 +1,35 @@
SUMMARY = "The GNU awk text processing utility"
DESCRIPTION = "The gawk package contains the GNU version of awk, a text processing \
utility. Awk interprets a special-purpose programming language to do \
quick and easy text pattern matching and reformatting jobs."
HOMEPAGE = "www.gnu.org/software/gawk"
BUGTRACKER = "bug-gawk@gnu.org"
SECTION = "console/utils"
# gawk <= 3.1.5: GPLv2
# gawk >= 3.1.6: GPLv3
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
RDEPENDS_gawk += "gawk-common"
RDEPENDS_pgawk += "gawk-common"
PR = "r0"
SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz"
SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30"
SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8"
inherit autotools gettext update-alternatives
PACKAGES += "gawk-common pgawk"
FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk"
FILES_gawk-common += "${datadir}/awk/* ${libexecdir}/awk/*"
FILES_pgawk = "${bindir}/pgawk*"
FILES_${PN}-dbg += "${libexecdir}/awk/.debug"
ALTERNATIVE_NAME = "awk"
ALTERNATIVE_PATH = "gawk"
ALTERNATIVE_LINK = "${bindir}/awk"
ALTERNATIVE_PRIORITY = "100"
@@ -0,0 +1,33 @@
DESCRIPTION = "A program that you can use to select particular records in a \
file and perform operations upon them."
HOMEPAGE = "www.gnu.org/software/gawk"
BUGTRACKER = "bug-gawk@gnu.org"
SECTION = "console/utils"
# gawk <= 3.1.5: GPLv2
# gawk >= 3.1.6: GPLv3
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
RDEPENDS_gawk += "gawk-common"
RDEPENDS_pgawk += "gawk-common"
PR = "r0"
SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz"
SRC_URI[md5sum] = "51e417b71287629940051e6f652c6492"
SRC_URI[sha256sum] = "c3a7cf7d976e05c6a1d8a9b3f14fa55d4304707408ddafb1396212653ea00be5"
inherit autotools gettext update-alternatives
PACKAGES += "gawk-common pgawk"
FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk"
FILES_gawk-common += "${datadir}/awk/* ${libexecdir}/awk/*"
FILES_pgawk = "${bindir}/pgawk*"
FILES_${PN}-dbg += "${libexecdir}/awk/.debug"
ALTERNATIVE_NAME = "awk"
ALTERNATIVE_PATH = "gawk"
ALTERNATIVE_LINK = "${bindir}/awk"
ALTERNATIVE_PRIORITY = "100"
@@ -0,0 +1,40 @@
/* Parameters derived from machine and compiler architecture. */
/* This file is generated mechanically by genarch.c. */
/* ---------------- Scalar alignments ---------------- */
#define ARCH_ALIGN_SHORT_MOD 2
#define ARCH_ALIGN_INT_MOD 4
#define ARCH_ALIGN_LONG_MOD 4
#define ARCH_ALIGN_PTR_MOD 4
#define ARCH_ALIGN_FLOAT_MOD 4
#define ARCH_ALIGN_DOUBLE_MOD 8
/* ---------------- Scalar sizes ---------------- */
#define ARCH_LOG2_SIZEOF_CHAR 0
#define ARCH_LOG2_SIZEOF_SHORT 1
#define ARCH_LOG2_SIZEOF_INT 2
#define ARCH_LOG2_SIZEOF_LONG 2
#define ARCH_LOG2_SIZEOF_LONG_LONG 3
#define ARCH_SIZEOF_GX_COLOR_INDEX 8
#define ARCH_SIZEOF_PTR 4
#define ARCH_SIZEOF_FLOAT 4
#define ARCH_SIZEOF_DOUBLE 8
#define ARCH_FLOAT_MANTISSA_BITS 24
#define ARCH_DOUBLE_MANTISSA_BITS 53
/* ---------------- Unsigned max values ---------------- */
#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
/* ---------------- Miscellaneous ---------------- */
#define ARCH_IS_BIG_ENDIAN 0
#define ARCH_PTRS_ARE_SIGNED 0
#define ARCH_FLOATS_ARE_IEEE 1
#define ARCH_ARITH_RSHIFT 2
#define ARCH_DIV_NEG_POS_TRUNCATES 1
@@ -0,0 +1,27 @@
Import patch from windriver linux for cross compilation, and split patches
into oe way under different directories such as i586, powerpc etc according
to Richard's opinion.
Upstream-Status: Pending
Signed-off-by: Kang Kai <kai.kang@windriver.com>
# Author: Chi Xu <chi.xu@windriver.com>
# Date: Feb 26 2010
# Summary: Generate arch.h for ppc32
#
diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak
--- ghostscript-8.64.orig/base/lib.mak 2010-02-10 10:30:02.000000000 +0800
+++ ghostscript-8.64/base/lib.mak 2010-02-10 10:56:21.000000000 +0800
@@ -50,8 +50,8 @@
stdpre_h=$(GLSRC)stdpre.h $(stdpn_h)
stdint__h=$(GLSRC)stdint_.h $(std_h)
-$(GLGEN)arch.h : $(GENARCH_XE)
- $(EXP)$(GENARCH_XE) $(GLGEN)arch.h
+##$(GLGEN)arch.h : $(GENARCH_XE)
+## $(EXP)$(GENARCH_XE) $(GLGEN)arch.h
# Platform interfaces
@@ -0,0 +1,36 @@
When parallel make it will fail with multi copy, see
http://bugzilla.pokylinux.org/show_bug.cgi?id=1202
Upstream-Status: Pending
Signed-off-by: Kang Kai <kai.kang@windriver.com>
RP: Tweaked to include lib.mak fixes
--- ghostscript-9.02/base/unixhead.mak.orig 2011-07-27 17:06:17.749456100 +0800
+++ ghostscript-9.02/base/unixhead.mak 2011-07-27 17:06:37.449456100 +0800
@@ -54,7 +54,7 @@
# Define generic commands.
-CP_=cp
+CP_=cp -f
RM_=rm -f
RMN_=rm -f
Index: ghostscript-9.04/base/lib.mak
===================================================================
--- ghostscript-9.04.orig/base/lib.mak 2011-11-25 13:06:21.728502636 +0000
+++ ghostscript-9.04/base/lib.mak 2011-11-25 13:08:33.924504957 +0000
@@ -592,10 +592,8 @@
$(gscdefs_h) $(gconf_h)\
$(gxdevice_h) $(gxiclass_h) $(gxiodev_h) $(gxiparam_h) $(TOP_MAKEFILES)\
$(MAKEDDIRS)
- $(RM_) $(GLGEN)gconfig.c
- $(RM_) $(GLGEN)gconfig.h
- $(CP_) $(gconfig_h) $(GLGEN)gconfig.h
- $(CP_) $(GLSRC)gconf.c $(GLGEN)gconfig.c
+ $(CP_) $(gconfig_h) $(GLGEN)gconfig.h || true
+ $(CP_) $(GLSRC)gconf.c $(GLGEN)gconfig.c || true
$(GLCC) $(GLO_)gconfig.$(OBJ) $(C_) $(GLGEN)gconfig.c
$(GLOBJ)gscdefs.$(OBJ) : $(GLSRC)gscdef.c\
@@ -0,0 +1,95 @@
Just use commands provided by ghostscript-native, preventing recompile them when
compile ghostscript.
Way to enable cross compile.
Upstream-Status: Pending
Signed-off-by: Kang Kai <kai.kang@windriver.com>
--- a/base/unix-aux.mak.orig 2011-10-17 16:12:20.354167007 +0800
+++ a/base/unix-aux.mak 2011-10-17 16:16:26.774167008 +0800
@@ -67,45 +67,45 @@
# -------------------------- Auxiliary programs --------------------------- #
-$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS)
- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c
-
-# On the RS/6000 (at least), compiling genarch.c with gcc with -O
-# produces a buggy executable.
-$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS)
- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c
-
-$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS)
- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c
-
-$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS)
- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c
-
-$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS)
- $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c
-
-# To get GS to use the system zlib, you remove/hide the gs/zlib directory
-# which means that the mkromfs build can't find the zlib source it needs.
-# So it's split into two targets, one using the zlib source directly.....
-MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gscdefs.$(OBJ) $(AUX)gsmisc.$(OBJ) \
- $(AUX)gpmisc.$(OBJ) $(AUX)gslibctx.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
-
-$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0)
- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) -lm $(EXTRALIBS)
-
-# .... and one using the zlib library linked via the command line
-MKROMFS_OBJS_1=$(GLOBJ)gscdefs.$(OBJ) $(GLOBJ)gsmisc.$(OBJ) \
- $(GLOBJ)gpmisc.$(OBJ) $(GLOBJ)gslibctx.$(OBJ) $(GLOBJ)gp_getnv.$(OBJ) \
- $(GLOBJ)gp_unix.$(OBJ) $(GLOBJ)gp_unifs.$(OBJ) $(GLOBJ)gp_unifn.$(OBJ) \
- $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gsutil.$(OBJ)
-
-$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1)
- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) -lm $(EXTRALIBS)
-
-$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
- $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
+#$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS)
+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c
+#
+## On the RS/6000 (at least), compiling genarch.c with gcc with -O
+## produces a buggy executable.
+#$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS)
+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c
+#
+#$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS)
+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c
+#
+#$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS)
+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c
+#
+#$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS)
+# $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c
+#
+## To get GS to use the system zlib, you remove/hide the gs/zlib directory
+## which means that the mkromfs build can't find the zlib source it needs.
+## So it's split into two targets, one using the zlib source directly.....
+#MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gscdefs.$(OBJ) $(AUX)gsmisc.$(OBJ) \
+# $(AUX)gpmisc.$(OBJ) $(AUX)gslibctx.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
+# $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
+# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
+#
+#$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0)
+# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) -lm $(EXTRALIBS)
+#
+## .... and one using the zlib library linked via the command line
+#MKROMFS_OBJS_1=$(GLOBJ)gscdefs.$(OBJ) $(GLOBJ)gsmisc.$(OBJ) \
+# $(GLOBJ)gpmisc.$(OBJ) $(GLOBJ)gslibctx.$(OBJ) $(GLOBJ)gp_getnv.$(OBJ) \
+# $(GLOBJ)gp_unix.$(OBJ) $(GLOBJ)gp_unifs.$(OBJ) $(GLOBJ)gp_unifn.$(OBJ) \
+# $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gsutil.$(OBJ)
+#
+#$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1)
+# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) -lm $(EXTRALIBS)
+#
+#$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
+# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
# Query the environment to construct gconfig_.h.
# The "else true;" is required because Ultrix's implementation of sh -e
@@ -0,0 +1,41 @@
/* Parameters derived from machine and compiler architecture. */
/* This file is generated mechanically by genarch.c. */
/* ---------------- Scalar alignments ---------------- */
#define ARCH_ALIGN_SHORT_MOD 2
#define ARCH_ALIGN_INT_MOD 4
#define ARCH_ALIGN_LONG_MOD 4
#define ARCH_ALIGN_PTR_MOD 4
#define ARCH_ALIGN_FLOAT_MOD 4
#define ARCH_ALIGN_DOUBLE_MOD 4
/* ---------------- Scalar sizes ---------------- */
#define ARCH_LOG2_SIZEOF_CHAR 0
#define ARCH_LOG2_SIZEOF_SHORT 1
#define ARCH_LOG2_SIZEOF_INT 2
#define ARCH_LOG2_SIZEOF_LONG 2
#define ARCH_LOG2_SIZEOF_LONG_LONG 3
#define ARCH_SIZEOF_GX_COLOR_INDEX 8
#define ARCH_SIZEOF_PTR 4
#define ARCH_SIZEOF_FLOAT 4
#define ARCH_SIZEOF_DOUBLE 8
#define ARCH_FLOAT_MANTISSA_BITS 24
#define ARCH_DOUBLE_MANTISSA_BITS 53
/* ---------------- Unsigned max values ---------------- */
#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
/* ---------------- Miscellaneous ---------------- */
#define ARCH_IS_BIG_ENDIAN 0
#define ARCH_PTRS_ARE_SIGNED 0
#define ARCH_FLOATS_ARE_IEEE 1
#define ARCH_ARITH_RSHIFT 2
#define ARCH_DIV_NEG_POS_TRUNCATES 1
@@ -0,0 +1,41 @@
/* Parameters derived from machine and compiler architecture. */
/* This file is generated mechanically by genarch.c. */
/* ---------------- Scalar alignments ---------------- */
#define ARCH_ALIGN_SHORT_MOD 2
#define ARCH_ALIGN_INT_MOD 4
#define ARCH_ALIGN_LONG_MOD 4
#define ARCH_ALIGN_PTR_MOD 4
#define ARCH_ALIGN_FLOAT_MOD 4
#define ARCH_ALIGN_DOUBLE_MOD 4
/* ---------------- Scalar sizes ---------------- */
#define ARCH_LOG2_SIZEOF_CHAR 0
#define ARCH_LOG2_SIZEOF_SHORT 1
#define ARCH_LOG2_SIZEOF_INT 2
#define ARCH_LOG2_SIZEOF_LONG 2
#define ARCH_LOG2_SIZEOF_LONG_LONG 3
#define ARCH_SIZEOF_GX_COLOR_INDEX 8
#define ARCH_SIZEOF_PTR 4
#define ARCH_SIZEOF_FLOAT 4
#define ARCH_SIZEOF_DOUBLE 8
#define ARCH_FLOAT_MANTISSA_BITS 24
#define ARCH_DOUBLE_MANTISSA_BITS 53
/* ---------------- Unsigned max values ---------------- */
#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
/* ---------------- Miscellaneous ---------------- */
#define ARCH_IS_BIG_ENDIAN 0
#define ARCH_PTRS_ARE_SIGNED 0
#define ARCH_FLOATS_ARE_IEEE 1
#define ARCH_ARITH_RSHIFT 2
#define ARCH_DIV_NEG_POS_TRUNCATES 1
@@ -0,0 +1,40 @@
/* Parameters derived from machine and compiler architecture. */
/* This file is generated mechanically by genarch.c. */
/* ---------------- Scalar alignments ---------------- */
#define ARCH_ALIGN_SHORT_MOD 2
#define ARCH_ALIGN_INT_MOD 4
#define ARCH_ALIGN_LONG_MOD 4
#define ARCH_ALIGN_PTR_MOD 4
#define ARCH_ALIGN_FLOAT_MOD 4
#define ARCH_ALIGN_DOUBLE_MOD 8
/* ---------------- Scalar sizes ---------------- */
#define ARCH_LOG2_SIZEOF_CHAR 0
#define ARCH_LOG2_SIZEOF_SHORT 1
#define ARCH_LOG2_SIZEOF_INT 2
#define ARCH_LOG2_SIZEOF_LONG 2
#define ARCH_LOG2_SIZEOF_LONG_LONG 3
#define ARCH_SIZEOF_GX_COLOR_INDEX 8
#define ARCH_SIZEOF_PTR 4
#define ARCH_SIZEOF_FLOAT 4
#define ARCH_SIZEOF_DOUBLE 8
#define ARCH_FLOAT_MANTISSA_BITS 24
#define ARCH_DOUBLE_MANTISSA_BITS 53
/* ---------------- Unsigned max values ---------------- */
#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
/* ---------------- Miscellaneous ---------------- */
#define ARCH_IS_BIG_ENDIAN 1
#define ARCH_PTRS_ARE_SIGNED 0
#define ARCH_FLOATS_ARE_IEEE 1
#define ARCH_ARITH_RSHIFT 2
#define ARCH_DIV_NEG_POS_TRUNCATES 1
@@ -0,0 +1,40 @@
/* Parameters derived from machine and compiler architecture. */
/* This file is generated mechanically by genarch.c. */
/* ---------------- Scalar alignments ---------------- */
#define ARCH_ALIGN_SHORT_MOD 2
#define ARCH_ALIGN_INT_MOD 4
#define ARCH_ALIGN_LONG_MOD 4
#define ARCH_ALIGN_PTR_MOD 4
#define ARCH_ALIGN_FLOAT_MOD 4
#define ARCH_ALIGN_DOUBLE_MOD 8
/* ---------------- Scalar sizes ---------------- */
#define ARCH_LOG2_SIZEOF_CHAR 0
#define ARCH_LOG2_SIZEOF_SHORT 1
#define ARCH_LOG2_SIZEOF_INT 2
#define ARCH_LOG2_SIZEOF_LONG 2
#define ARCH_LOG2_SIZEOF_LONG_LONG 3
#define ARCH_SIZEOF_GX_COLOR_INDEX 8
#define ARCH_SIZEOF_PTR 4
#define ARCH_SIZEOF_FLOAT 4
#define ARCH_SIZEOF_DOUBLE 8
#define ARCH_FLOAT_MANTISSA_BITS 24
#define ARCH_DOUBLE_MANTISSA_BITS 53
/* ---------------- Unsigned max values ---------------- */
#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
/* ---------------- Miscellaneous ---------------- */
#define ARCH_IS_BIG_ENDIAN 1
#define ARCH_PTRS_ARE_SIGNED 0
#define ARCH_FLOATS_ARE_IEEE 1
#define ARCH_ARITH_RSHIFT 2
#define ARCH_DIV_NEG_POS_TRUNCATES 1
@@ -0,0 +1,40 @@
/* Parameters derived from machine and compiler architecture. */
/* This file is generated mechanically by genarch.c. */
/* ---------------- Scalar alignments ---------------- */
#define ARCH_ALIGN_SHORT_MOD 2
#define ARCH_ALIGN_INT_MOD 4
#define ARCH_ALIGN_LONG_MOD 8
#define ARCH_ALIGN_PTR_MOD 8
#define ARCH_ALIGN_FLOAT_MOD 4
#define ARCH_ALIGN_DOUBLE_MOD 8
/* ---------------- Scalar sizes ---------------- */
#define ARCH_LOG2_SIZEOF_CHAR 0
#define ARCH_LOG2_SIZEOF_SHORT 1
#define ARCH_LOG2_SIZEOF_INT 2
#define ARCH_LOG2_SIZEOF_LONG 3
#define ARCH_LOG2_SIZEOF_LONG_LONG 3
#define ARCH_SIZEOF_GX_COLOR_INDEX 8
#define ARCH_SIZEOF_PTR 8
#define ARCH_SIZEOF_FLOAT 4
#define ARCH_SIZEOF_DOUBLE 8
#define ARCH_FLOAT_MANTISSA_BITS 24
#define ARCH_DOUBLE_MANTISSA_BITS 53
/* ---------------- Unsigned max values ---------------- */
#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
/* ---------------- Miscellaneous ---------------- */
#define ARCH_IS_BIG_ENDIAN 1
#define ARCH_PTRS_ARE_SIGNED 0
#define ARCH_FLOATS_ARE_IEEE 1
#define ARCH_ARITH_RSHIFT 2
#define ARCH_DIV_NEG_POS_TRUNCATES 1
@@ -0,0 +1,40 @@
/* Parameters derived from machine and compiler architecture. */
/* This file is generated mechanically by genarch.c. */
/* ---------------- Scalar alignments ---------------- */
#define ARCH_ALIGN_SHORT_MOD 2
#define ARCH_ALIGN_INT_MOD 4
#define ARCH_ALIGN_LONG_MOD 8
#define ARCH_ALIGN_PTR_MOD 8
#define ARCH_ALIGN_FLOAT_MOD 4
#define ARCH_ALIGN_DOUBLE_MOD 8
/* ---------------- Scalar sizes ---------------- */
#define ARCH_LOG2_SIZEOF_CHAR 0
#define ARCH_LOG2_SIZEOF_SHORT 1
#define ARCH_LOG2_SIZEOF_INT 2
#define ARCH_LOG2_SIZEOF_LONG 3
#define ARCH_LOG2_SIZEOF_LONG_LONG 3
#define ARCH_SIZEOF_GX_COLOR_INDEX 8
#define ARCH_SIZEOF_PTR 8
#define ARCH_SIZEOF_FLOAT 4
#define ARCH_SIZEOF_DOUBLE 8
#define ARCH_FLOAT_MANTISSA_BITS 24
#define ARCH_DOUBLE_MANTISSA_BITS 53
/* ---------------- Unsigned max values ---------------- */
#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
/* ---------------- Miscellaneous ---------------- */
#define ARCH_IS_BIG_ENDIAN 0
#define ARCH_PTRS_ARE_SIGNED 0
#define ARCH_FLOATS_ARE_IEEE 1
#define ARCH_ARITH_RSHIFT 2
#define ARCH_DIV_NEG_POS_TRUNCATES 1
@@ -0,0 +1,116 @@
SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter"
DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \
a back-end to a program such as ghostview, it can display PostScript and PDF \
documents in an X11 environment. \
\
Furthermore, it can render PostScript and PDF files as graphics to be printed \
on non-PostScript printers. Supported printers include common \
dot-matrix, inkjet and laser models. \
\
Package gsfonts contains a set of standard fonts for Ghostscript. \
"
HOMEPAGE = "http://www.ghostscript.com"
SECTION = "console/utils"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d151214b3131251dfc9d858593acbd24"
PR = "r3"
DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
DEPENDS_virtclass-native = ""
SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz"
SRC_URI = "${SRC_URI_BASE} \
file://ghostscript-9.02-prevent_recompiling.patch \
file://ghostscript-9.02-genarch.patch \
file://objarch.h \
file://ghostscript-9.02-parallel-make.patch \
"
SRC_URI_virtclass-native = "${SRC_URI_BASE}"
SRC_URI[md5sum] = "9c2fb4af1eb609d09dba5bb0fa76173a"
SRC_URI[sha256sum] = "f1e333738c41c3bf2b47ceb9806abb8045bcdc7353002c32736150425a7c1ef4"
EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec --without-jasper \
--with-fontpath=${datadir}/fonts --with-install-cups"
# This has been fixed upstream but for now we need to subvert the check for time.h
# http://bugs.ghostscript.com/show_bug.cgi?id=692443
# http://bugs.ghostscript.com/show_bug.cgi?id=692426
CFLAGS += "-DHAVE_SYS_TIME_H=1"
BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
inherit autotools
do_configure_prepend () {
mkdir -p obj
mkdir -p soobj
if [ -e ${WORKDIR}/objarch.h ]; then
cp ${WORKDIR}/objarch.h obj/arch.h
fi
}
do_configure_append () {
# copy tools from the native ghostscript build
if [ "${PN}" != "ghostscript-native" ]; then
mkdir -p obj/aux soobj
for i in genarch genconf mkromfs echogs gendev genht; do
cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
done
fi
# replace cups paths from sysroots/.../usr/bin/crossscripts/cups-config with target paths
# CUPSDATA is compiled into a utility, and CUPSSERVERBIN is used as an install path
CUPSSERVERBIN=${exec_prefix}/lib/cups # /usr/lib NOT libdir
CUPSDATA=${datadir}/cups
sed -e "s#^CUPSSERVERBIN=.*#CUPSSERVERBIN=${CUPSSERVERBIN}#" -i Makefile
sed -e "s#^CUPSDATA=.*#CUPSDATA=${CUPSDATA}#" -i Makefile
}
do_install_append () {
mkdir -p ${D}${datadir}/ghostscript/${PV}/
cp -r Resource ${D}${datadir}/ghostscript/${PV}/
cp -r iccprofiles ${D}${datadir}/ghostscript/${PV}/
chown -R root:lp ${D}${sysconfdir}/cups
}
python do_patch_virtclass-native () {
pass
}
do_compile_virtclass-native () {
mkdir -p obj
for i in genarch genconf mkromfs echogs gendev genht; do
oe_runmake obj/aux/$i
done
}
do_install_virtclass-native () {
install -d ${D}${bindir}/ghostscript-${PV}
for i in genarch genconf mkromfs echogs gendev genht; do
install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
done
}
BBCLASSEXTEND = "native"
# Ghostscript install tool 'instcopy' tries to remove already created
# directories during install and parallel make causes problems.
PARALLEL_MAKEINST=""
PACKAGES =+ "${PN}-cups"
FILES_${PN}-dbg += "${exec_prefix}/lib/cups/filter/.debug"
FILES_${PN}-cups += "${exec_prefix}/lib/cups/filter/gstoraster \
${exec_prefix}/lib/cups/filter/pstopxl \
${datadir}/cups \
${sysconfdir}/cups \
"
RDEPENDS_${PN}-cups = ${PN}
@@ -0,0 +1,22 @@
DESCRIPTION = "GNU gperf is a perfect hash function generator"
HOMEPAGE = "http://www.gnu.org/software/gperf"
SUMMARY = "Generate a perfect hash function from a set of keywords"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://src/main.cc;firstline=8;endline=19;md5=24688d2dff69bcf5cbea4bc3e4174c5a"
SRC_URI = "${GNU_MIRROR}/gperf/gperf-${PV}.tar.gz"
inherit autotools
# autoreconf couldn't find acinclude.m4 when stepping into subdirectory. Instead of
# duplicating acinclude.m4 in every subdirectory, use absolute include path to aclocal
EXTRA_AUTORECONF += " -I ${S}"
do_configure_prepend() {
if [ ! -e acinclude.m4 ]; then
cat aclocal.m4 > acinclude.m4
fi
}
BBCLASSEXTEND = "native"
@@ -0,0 +1,10 @@
require gperf.inc
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=a5f84abb0070adf8a0925d7d534b6e0a \
file://src/main.cc;firstline=8;endline=19;md5=3eab12ba436c4da725b19b131def6de9"
PR = "r1"
SRC_URI[md5sum] = "cc20e58975a38075440423c8fb85fd00"
SRC_URI[sha256sum] = "63287527c8d9e27e801cf0804436f3494bd569db05d49dcdd2a942ae72fa9055"
@@ -0,0 +1,6 @@
require gperf.inc
PR = "r0"
SRC_URI[md5sum] = "c1f1db32fb6598d6a93e6e88796a8632"
SRC_URI[sha256sum] = "767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e"
@@ -0,0 +1,55 @@
Upstream-Status: Inappropriate [licensing]
# Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which
# doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have
# mempcpy, we'll just use that instead.
# Patch source: OpenEmbedded
Index: grep-2.5.1/intl/localealias.c
===================================================================
--- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100
+++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000
@@ -65,7 +65,7 @@
# define strcasecmp __strcasecmp
# ifndef mempcpy
-# define mempcpy __mempcpy
+# error "mempcpy not detected"
# endif
# define HAVE_MEMPCPY 1
# define HAVE___FSETLOCKING 1
Index: grep-2.5.1/lib/getopt.c
===================================================================
--- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100
+++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000
@@ -326,7 +326,7 @@
nonoption_flags_len = nonoption_flags_max_len = 0;
else
{
- memset (__mempcpy (new_str, __getopt_nonoption_flags,
+ memset (mempcpy (new_str, __getopt_nonoption_flags,
nonoption_flags_max_len),
'\0', top + 1 - nonoption_flags_max_len);
nonoption_flags_max_len = top + 1;
@@ -437,7 +437,7 @@
if (__getopt_nonoption_flags == NULL)
nonoption_flags_max_len = -1;
else
- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
+ memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
'\0', nonoption_flags_max_len - len);
}
}
Index: grep-2.5.1/lib/regex.c
===================================================================
--- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000
+++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000
@@ -7842,7 +7842,7 @@
if (msg_size > errbuf_size)
{
#if defined HAVE_MEMPCPY || defined _LIBC
- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
+ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
#else
memcpy (errbuf, msg, errbuf_size - 1);
errbuf[errbuf_size - 1] = 0;
@@ -0,0 +1,42 @@
SUMMARY = "Pattern matching utilities"
DESCRIPTION = "The GNU versions of commonly used grep utilities. The grep command searches one or more input \
files for lines containing a match to a specified pattern."
SECTION = "console/utils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
PR = "r1"
SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
file://uclibc-fix.patch"
SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c"
SRC_URI[sha256sum] = "38c8a2bb9223d1fb1b10bdd607cf44830afc92fd451ac4cd07619bf92bdd3132"
inherit autotools gettext
EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
do_configure_prepend () {
rm -f ${S}/m4/init.m4
}
do_install () {
autotools_do_install
install -d ${D}${base_bindir}
mv ${D}${bindir}/grep ${D}${base_bindir}/grep.${PN}
mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep.${PN}
mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN}
}
pkg_postinst_${PN} () {
update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100
update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100
update-alternatives --install ${base_bindir}/fgrep fgrep fgrep.${PN} 100
}
pkg_prerm_${PN} () {
update-alternatives --remove grep grep.${PN}
update-alternatives --remove egrep egrep.${PN}
update-alternatives --remove fgrep fgrep.${PN}
}
@@ -0,0 +1,42 @@
SUMMARY = "GNU grep utility"
DESCRIPTION = "GNU grep utility"
HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep"
SECTION = "console/utils"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
PR = "r0"
SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.gz"
SRC_URI[md5sum] = "03e3451a38b0d615cb113cbeaf252dc0"
SRC_URI[sha256sum] = "e9118eac72ecc71191725a7566361ab7643edfd3364869a47b78dc934a357970"
inherit autotools gettext
EXTRA_OECONF = "--disable-perl-regexp"
do_configure_prepend () {
rm -f ${S}/m4/init.m4
}
do_install () {
autotools_do_install
install -d ${D}${base_bindir}
mv ${D}${bindir}/grep ${D}${base_bindir}/grep.${PN}
mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep.${PN}
mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN}
}
pkg_postinst_${PN} () {
update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100
update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100
update-alternatives --install ${base_bindir}/fgrep fgrep fgrep.${PN} 100
}
pkg_prerm_${PN} () {
update-alternatives --remove grep grep.${PN}
update-alternatives --remove egrep egrep.${PN}
update-alternatives --remove fgrep fgrep.${PN}
}
@@ -0,0 +1,44 @@
SUMMARY = "GNU Troff software"
DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \
formatting commands and produces formatted output."
SECTION = "base"
HOMEPAGE = "ftp://ftp.gnu.org/gnu/groff/"
LICENSE = "GPLv2"
PR = "r1"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz"
SRC_URI[md5sum] = "48fa768dd6fdeb7968041dd5ae8e2b02"
SRC_URI[sha256sum] = "b645878135cb620c6c417c5601bfe96172245af12045540d7344938b4c2cd805"
DEPENDS = "groff-native"
DEPENDS_virtclass-native = ""
inherit autotools
EXTRA_OECONF = "--without-x"
PARALLEL_MAKE = ""
do_configure_prepend() {
if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
sed -i \
-e '/^GROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/groff:' \
-e '/^TROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/troff:' \
-e '/^GROFF_BIN_PATH=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
-e '/^GROFF_BIN_DIR=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
${S}/contrib/*/Makefile.sub \
${S}/doc/Makefile.in \
${S}/doc/Makefile.sub
fi
}
do_install_append_virtclass-native() {
create_cmdline_wrapper ${D}/${bindir}/groff \
-F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
-M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac
}
BBCLASSEXTEND = "native"
@@ -0,0 +1,48 @@
gzip uses gnulib, whose header conflict with glibc. This patch rename some function to avoid conflict.
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Upstream-Status: Inappropriate [licensing]
Index: gzip-1.3.12/gzip.c
===================================================================
--- gzip-1.3.12.orig/gzip.c 2010-08-13 10:29:38.000000000 +0800
+++ gzip-1.3.12/gzip.c 2010-08-13 10:29:44.000000000 +0800
@@ -1637,7 +1637,7 @@
}
}
- if (futimens (ofd, ofname, timespec) != 0)
+ if (futimens_gnulib (ofd, ofname, timespec) != 0)
{
int e = errno;
WARN ((stderr, "%s: ", program_name));
Index: gzip-1.3.12/lib/utimens.c
===================================================================
--- gzip-1.3.12.orig/lib/utimens.c 2010-08-13 10:33:47.000000000 +0800
+++ gzip-1.3.12/lib/utimens.c 2010-08-13 10:34:02.000000000 +0800
@@ -75,7 +75,7 @@
Return 0 on success, -1 (setting errno) on failure. */
int
-futimens (int fd ATTRIBUTE_UNUSED,
+futimens_gnulib (int fd ATTRIBUTE_UNUSED,
char const *file, struct timespec const timespec[2])
{
/* Some Linux-based NFS clients are buggy, and mishandle time stamps
@@ -185,5 +185,5 @@
int
utimens (char const *file, struct timespec const timespec[2])
{
- return futimens (-1, file, timespec);
+ return futimens_gnulib (-1, file, timespec);
}
Index: gzip-1.3.12/lib/utimens.h
===================================================================
--- gzip-1.3.12.orig/lib/utimens.h 2010-08-13 10:14:57.000000000 +0800
+++ gzip-1.3.12/lib/utimens.h 2010-08-13 10:21:45.000000000 +0800
@@ -1,3 +1,3 @@
#include <time.h>
-int futimens (int, char const *, struct timespec const [2]);
+int futimens_gnulib (int, char const *, struct timespec const [2]);
int utimens (char const *, struct timespec const [2]);
@@ -0,0 +1,56 @@
remove AC_USE_SYSTEM_EXTENSIONS to fix the autoconf error "AC_REQUIRE: circular
dependency of AC_GNU_SOURCE"
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Upstream-Status: Inappropriate [licensing]
Index: gzip-1.3.12/m4/extensions.m4
===================================================================
--- gzip-1.3.12.orig/m4/extensions.m4 2010-08-16 14:18:16.000000000 +0800
+++ gzip-1.3.12/m4/extensions.m4 2010-08-16 14:21:54.000000000 +0800
@@ -12,44 +12,6 @@
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
-# AC_USE_SYSTEM_EXTENSIONS
-# ------------------------
-# Enable extensions on systems that normally disable them,
-# typically due to standards-conformance issues.
-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-[
- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
- AC_BEFORE([$0], [AC_RUN_IFELSE])
-
- AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([AC_AIX])
- AC_REQUIRE([AC_MINIX])
-
- AH_VERBATIM([__EXTENSIONS__],
-[/* Enable extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif])
- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
- [ac_cv_safe_to_define___extensions__],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([
-# define __EXTENSIONS__ 1
- AC_INCLUDES_DEFAULT])],
- [ac_cv_safe_to_define___extensions__=yes],
- [ac_cv_safe_to_define___extensions__=no])])
- test $ac_cv_safe_to_define___extensions__ = yes &&
- AC_DEFINE([__EXTENSIONS__])
- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
- AC_DEFINE([_TANDEM_SOURCE])
-])
-
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,
@@ -0,0 +1,40 @@
SUMMARY = "Standard GNU compressor"
DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \
project. Mark Adler wrote the decompression part"
HOMEPAGE = "http://www.gnu.org/software/gzip/"
SECTION = "console/utils"
# change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://gzip.h;firstline=8;endline=20;md5=e2ec6b91fbe43a18f6081f3bbae46a01"
SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
inherit autotools
do_install () {
autotools_do_install
if [ "${PN}" = "${BPN}" ] ; then
# Rename and move files into /bin (FHS), which is typical place for gzip
install -d ${D}${base_bindir}
mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip.${PN}
mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip.${PN}
mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat.${PN}
fi
}
pkg_postinst_${PN} () {
if [ "${PN}" = "${BPN}" ] ; then
update-alternatives --install ${base_bindir}/gunzip gunzip gunzip.${PN} 100
update-alternatives --install ${base_bindir}/gzip gzip gzip.${PN} 100
update-alternatives --install ${base_bindir}/zcat zcat zcat.${PN} 100
fi
}
pkg_prerm_${PN} () {
if [ "${PN}" = "${BPN}" ] ; then
update-alternatives --remove gunzip gunzip.${PN}
update-alternatives --remove gzip gzip.${PN}
update-alternatives --remove zcat zcat.${PN}
fi
}
@@ -0,0 +1,44 @@
SUMMARY = "Standard GNU compressor"
DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \
project. Mark Adler wrote the decompression part"
HOMEPAGE = "http://www.gnu.org/software/gzip"
SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
file://gzip.h;endline=22;md5=c0934ad1900d927f86556153d4c76d23 \
file://lzw.h;endline=19;md5=c273e09a02edd9801cc74d39683049e9 "
SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz \
file://m4-extensions-fix.patch \
file://dup-def-fix.patch"
SRC_URI[md5sum] = "b5bac2d21840ae077e0217bc5e4845b1"
SRC_URI[sha256sum] = "3f565be05f7f3d1aff117c030eb7c738300510b7d098cedea796ca8e4cd587af"
PR = "r0"
inherit autotools
do_install () {
autotools_do_install
# move files into /bin (FHS)
install -d ${D}${base_bindir}
mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip.${PN}
mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip.${PN}
mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat.${PN}
}
pkg_postinst_${PN} () {
update-alternatives --install ${base_bindir}/gunzip gunzip gunzip.${PN} 100
update-alternatives --install ${base_bindir}/gzip gzip gzip.${PN} 100
update-alternatives --install ${base_bindir}/zcat zcat zcat.${PN} 100
}
pkg_prerm_${PN} () {
update-alternatives --remove gunzip gunzip.${PN}
update-alternatives --remove gzip gzip.${PN}
update-alternatives --remove zcat zcat.${PN}
}
BBCLASSEXTEND = "native"
@@ -0,0 +1,8 @@
require gzip.inc
PR = "r0"
BBCLASSEXTEND = "native"
SRC_URI[md5sum] = "e381b8506210c794278f5527cba0e765"
SRC_URI[sha256sum] = "d166cfd3da380da1bd535633e8890bfb5664f9e68870a611d1dc01a3e9f711ee"
@@ -0,0 +1,35 @@
DESCRIPTION = "hdparm is a Linux shell utility for viewing \
and manipulating various IDE drive and driver parameters."
SECTION = "console/utils"
LICENSE = "BSD"
LICENSE_wiper = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \
file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
PACKAGES += "wiper"
FILES_wiper = "${bindir}/wiper.sh"
FILES_${PN} = "${base_sbindir} ${mandir}"
RDEPENDS_wiper = "bash gawk stat"
SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz "
SRC_URI[md5sum] = "0bb94ddd1bedd5c02b1ca62f1caaf6de"
SRC_URI[sha256sum] = "87ede0a7cb5b4de500748232e9d251b75acfccce078e1d42c8d125b9e5b4ccd3"
do_install () {
install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
mv ${D}${base_sbindir}/hdparm ${D}${base_sbindir}/hdparm.${PN}
cp ${S}/wiper/wiper.sh ${D}/${bindir}
}
pkg_postinst_${PN} () {
update-alternatives --install ${base_sbindir}/hdparm hdparm hdparm.${PN} 100
}
pkg_prerm_${PN} () {
update-alternatives --remove hdparm hdparm.${PN}
}
@@ -0,0 +1,13 @@
DESCRIPTION = "A foundational basic image without support for X that can be \
reasonably used for customization."
IMAGE_FEATURES += "apps-console-core ssh-server-openssh"
IMAGE_INSTALL = "\
task-core-boot \
task-core-basic \
"
# ${POKY_BASE_INSTALL}
inherit core-image
@@ -0,0 +1,13 @@
DESCRIPTION = "A core-image-lsb that includes everything in meta-toolchain \
but also includes development headers and libraries to form a complete \
standalone SDK."
IMAGE_FEATURES += "apps-console-core dev-pkgs ssh-server-openssh"
IMAGE_INSTALL = "\
${POKY_BASE_INSTALL} \
task-core-basic \
task-core-lsb \
"
inherit core-image
@@ -0,0 +1,15 @@
DESCRIPTION = "A core-image-lsb that includes everything in meta-toolchain \
but also includes development headers and libraries to form a complete \
standalone SDK."
IMAGE_FEATURES += "apps-console-core tools-sdk dev-pkgs ssh-server-openssh"
EXTRA_IMAGE_FEATURES = "tools-debug tools-profile tools-testapps debug-tweaks"
IMAGE_INSTALL = "\
${POKY_BASE_INSTALL} \
task-core-basic \
task-core-lsb \
"
inherit core-image
@@ -0,0 +1,12 @@
DESCRIPTION = "A core-image-basic image suitable for implementations that \
conform to Linux Standard Base (LSB)."
IMAGE_FEATURES += "apps-console-core ssh-server-openssh"
IMAGE_INSTALL = "\
${POKY_BASE_INSTALL} \
task-core-basic \
task-core-lsb \
"
inherit core-image
@@ -0,0 +1,18 @@
Don't check unknown symbols.
Signed-off-by: Shane Wang <shane.wang@intel.com>
Upstream-Status: Inappropriate [configuration]
diff -r abb89394ce0c extensions/GNUmakefile.in
--- a/extensions/GNUmakefile.in Mon Jan 23 00:12:27 2012 +0800
+++ b/extensions/GNUmakefile.in Mon Jan 23 00:38:32 2012 +0800
@@ -68,7 +68,7 @@
.PHONY: all install clean distclean FORCE
-all: ${targets} check
+all: ${targets}
check: ${targets}
@echo " CHECK unknown symbols in .so files"; \
@@ -0,0 +1,39 @@
SUMMARY = "Tools for managing kernel packaet filtering capabilities"
DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
filtering code in Linux."
HOMEPAGE = "http://www.netfilter.org/"
BUGTRACKER = "http://bugzilla.netfilter.org/"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
file://iptables/iptables.c;firstline=13;endline=25;md5=f1028f2401da1c120df27594b2be50ef"
PR = "r0"
RRECOMMENDS_${PN} = "kernel-module-x-tables \
kernel-module-ip-tables \
kernel-module-iptable-filter \
kernel-module-iptable-nat \
kernel-module-nf-defrag-ipv4 \
kernel-module-nf-conntrack \
kernel-module-nf-conntrack-ipv4 \
kernel-module-nf-nat \
kernel-module-ipt-masquerade"
FILES_${PN} =+ "${libdir}/xtables/"
FILES_${PN}-dbg =+ "${libdir}/xtables/.debug"
SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
file://GNUmakefile.patch"
SRC_URI[md5sum] = "212112389c7f10c72efb31a4ed193a4c"
SRC_URI[sha256sum] = "09fff7dfe6af95675474fd5d0fc67622fac5a0f3d6e02ee614deae9a2e5dae13"
inherit autotools
EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \
${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6', d)}"
do_configure_prepend() {
# Remove some libtool m4 files
# Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
}
@@ -0,0 +1,43 @@
Upstream-Status: Pending [from other distro Debian]
Index: trunk/ping.c
===================================================================
--- trunk.orig/ping.c 2010-05-07 23:13:54.000000000 -0700
+++ trunk/ping.c 2010-05-07 23:23:22.000000000 -0700
@@ -883,9 +883,36 @@
case ICMP_SR_FAILED:
printf("Source Route Failed\n");
break;
+ case ICMP_NET_UNKNOWN:
+ printf("Destination Net Unknown\n");
+ break;
+ case ICMP_HOST_UNKNOWN:
+ printf("Destination Host Unknown\n");
+ break;
+ case ICMP_HOST_ISOLATED:
+ printf("Source Host Isolated\n");
+ break;
+ case ICMP_NET_ANO:
+ printf("Destination Net Prohibited\n");
+ break;
+ case ICMP_HOST_ANO:
+ printf("Destination Host Prohibited\n");
+ break;
+ case ICMP_NET_UNR_TOS:
+ printf("Destination Net Unreachable for Type of Service\n");
+ break;
+ case ICMP_HOST_UNR_TOS:
+ printf("Destination Host Unreachable for Type of Service\n");
+ break;
case ICMP_PKT_FILTERED:
printf("Packet filtered\n");
break;
+ case ICMP_PREC_VIOLATION:
+ printf("Precedence Violation\n");
+ break;
+ case ICMP_PREC_CUTOFF:
+ printf("Precedence Cutoff\n");
+ break;
default:
printf("Dest Unreachable, Bad Code: %d\n", code);
break;
@@ -0,0 +1,26 @@
Upstream-Status: Pending [from other distro Debian]
Index: trunk/arping.c
===================================================================
--- trunk.orig/arping.c 2010-05-07 23:13:52.000000000 -0700
+++ trunk/arping.c 2010-05-07 23:41:16.000000000 -0700
@@ -182,12 +182,17 @@
if (start.tv_sec==0)
start = tv;
- if (count-- == 0 || (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500))
+ if (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500)
finish();
- if (last.tv_sec==0 || MS_TDIFF(tv,last) > 500) {
+ if ((!timeout) && (count == 0))
+ finish();
+
+ if ( count!=0 && (last.tv_sec==0 || MS_TDIFF(tv,last) > 500 ) ) {
send_pack(s, src, dst,
(struct sockaddr_ll *)&me, (struct sockaddr_ll *)&he);
+ if (count >= 0)
+ count--;
if (count == 0 && unsolicited)
finish();
}
@@ -0,0 +1,16 @@
Upstream-Status: Pending [from other distro Debian]
Index: trunk/ping_common.c
===================================================================
--- trunk.orig/ping_common.c 2010-05-07 23:13:51.000000000 -0700
+++ trunk/ping_common.c 2010-05-07 23:22:33.000000000 -0700
@@ -872,7 +872,8 @@
printf("%spipe %d", comma, pipesize);
comma = ", ";
}
- if (ntransmitted > 1 && (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
+ if (ntransmitted > 1 && nreceived &&
+ (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
int ipg = (1000000*(long long)tv.tv_sec+tv.tv_usec)/(ntransmitted-1);
printf("%sipg/ewma %d.%03d/%d.%03d ms",
comma, ipg/1000, ipg%1000, rtt/8000, (rtt/8)%1000);
@@ -0,0 +1,15 @@
Upstream-Status: Inappropriate [disable feature]
Index: trunk/Makefile
===================================================================
--- trunk.orig/Makefile 2010-05-07 23:43:00.000000000 -0700
+++ trunk/Makefile 2010-05-07 23:47:10.000000000 -0700
@@ -16,7 +16,7 @@
CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES)
-IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
+IPV4_TARGETS=tracepath ping arping clockdiff
IPV6_TARGETS=tracepath6 traceroute6 ping6
TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
@@ -0,0 +1,31 @@
Upstream-Status: Pending [from other distro Debian]
Index: trunk/tracepath.c
===================================================================
--- trunk.orig/tracepath.c 2010-05-07 23:13:52.000000000 -0700
+++ trunk/tracepath.c 2010-05-07 23:24:09.000000000 -0700
@@ -338,9 +338,9 @@
base_port = atoi(p+1);
} else
base_port = 44444;
- he = gethostbyname(argv[0]);
+ he = gethostbyname2(argv[0], AF_INET);
if (he == NULL) {
- herror("gethostbyname");
+ herror("gethostbyname2");
exit(1);
}
memcpy(&target.sin_addr, he->h_addr, 4);
Index: trunk/ping.c
===================================================================
--- trunk.orig/ping.c 2010-05-07 23:23:22.000000000 -0700
+++ trunk/ping.c 2010-05-07 23:24:09.000000000 -0700
@@ -250,7 +250,7 @@
if (argc == 1)
options |= F_NUMERIC;
} else {
- hp = gethostbyname(target);
+ hp = gethostbyname2(target, AF_INET);
if (!hp) {
fprintf(stderr, "ping: unknown host %s\n", target);
exit(2);
@@ -0,0 +1,27 @@
Fix nsgmls path issue
Upstream-Status: Pending
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Index: iputils-s20101006/doc/Makefile
===================================================================
--- iputils-s20101006.orig/doc/Makefile 2011-09-13 20:42:27.000000000 +0800
+++ iputils-s20101006/doc/Makefile 2011-09-13 21:01:52.000000000 +0800
@@ -27,10 +27,15 @@
# docbook2man produces utterly ugly output and I did not find
# any way to customize this but hacking backend perl script a little.
# Well, hence...
+# nsgmls seems append path to search directory according to the sysid path.
+# e.g. if input ../index.db, it would search $search_directory/../ rather than
+# $search_directory, which leads searching failure. Fixing nsgmls probably
+# introduce some side effects, so use this ugly hack: running nsgmls in current
+# directory, and running docbook2man in tmp directory.
$(MANFILES): index.db
@-mkdir tmp.db2man
- @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
+ @set -e; nsgmls $< >tmp.db2man/output; cd tmp.db2man; cat output | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
@-rm -rf tmp.db2man
clean:
@@ -0,0 +1,84 @@
SUMMARY = "Network monitoring tools"
DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
tracepath, tracepath6, ping, ping6 and arping."
HOMEPAGE = "http://www.skbuff.net/iputils"
SECTION = "console/network"
LICENSE = "BSD & GPLv2+"
LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \
file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \
file://arping.c;beginline=1;endline=10;md5=ada2a6d06acc90f943bddf40d15e0541 \
file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
DEPENDS = "sysfsutils openssl docbook-utils-native sgmlspl-native"
PR = "r2"
SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
file://debian/fix-dead-host-ping-stats.diff \
file://debian/add-icmp-return-codes.diff \
file://debian/use_gethostbyname2.diff \
file://debian/targets.diff \
file://debian/fix-arping-timeouts.diff \
file://nsgmls-path-fix.patch \
"
SRC_URI[md5sum] = "a36c25e9ec17e48be514dc0485e7376c"
SRC_URI[sha256sum] = "fd3af46c80ebb99607c2ca1f2a3608b6fe828e25bbec6e54f2afd25f6ddb6ee7"
do_compile () {
oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}" all man
}
do_install () {
install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8
# SUID root programs
install -m 4555 ping ${D}${base_bindir}/ping.${PN}
install -m 4555 ping6 ${D}${base_bindir}/ping6.${PN}
install -m 4555 traceroute6 ${D}${base_bindir}/
# Other programgs
for i in arping tracepath tracepath6; do
install -m 0755 $i ${D}${base_bindir}/
done
# Manual pages for things we build packages for
for i in tracepath.8 traceroute6.8 ping.8 arping.8; do
install -m 0644 doc/$i ${D}${mandir}/man8/ || true
done
}
# Busybox also provides ping and ping6, so use update-alternatives
# Also fixup SUID bit for applications that need it
pkg_postinst_${PN}-ping () {
chmod 4555 ${base_bindir}/ping.${PN}
update-alternatives --install ${base_bindir}/ping ping ping.${PN} 100
}
pkg_prerm_${PN}-ping () {
update-alternatives --remove ping ping.${PN}
}
pkg_postinst_${PN}-ping6 () {
chmod 4555 ${base_bindir}/ping6.${PN}
update-alternatives --install ${base_bindir}/ping6 ping6 ping6.${PN} 100
}
pkg_prerm_${PN}-ping6 () {
update-alternatives --remove ping6 ping6.${PN}
}
pkg_postinst_${PN}-traceroute6 () {
chmod 4555 ${base_bindir}/traceroute6
}
PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
ALLOW_EMPTY_${PN} = "1"
RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
FILES_${PN} = ""
FILES_${PN}-ping = "${base_bindir}/ping.${PN}"
FILES_${PN}-ping6 = "${base_bindir}/ping6.${PN}"
FILES_${PN}-arping = "${base_bindir}/arping"
FILES_${PN}-tracepath = "${base_bindir}/tracepath"
FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6"
FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6"
FILES_${PN}-doc = "${mandir}/man8"
@@ -0,0 +1,33 @@
SUMMARY = "Text file viewer similar to more"
DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
based program for viewing text files and the output from other \
programs. Less offers many features beyond those that more does."
HOMEPAGE = "http://www.greenwoodsoftware.com/"
SECTION = "console/utils"
# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less
# less is a 2-clause BSD-like permissive license
# Mark Nudelman (author of less) has given permission to utilize a generic
# 2-clause BSD
LICENSE = "GPLv3+ | BSD-2-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://LICENSE;md5=1237c0f825bb36122b0b2b486ffbe6be"
DEPENDS = "ncurses"
PR = "r1"
SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz"
SRC_URI[md5sum] = "56f9f76ffe13f70155f47f6b3c87d421"
SRC_URI[sha256sum] = "be64ad3e22d6d4aa19fe7024d998563a1ce1671ee3625f8851d26b16dedcdeeb"
inherit autotools update-alternatives
do_install () {
oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
mv ${D}${bindir}/less ${D}${bindir}/less.${PN}
}
ALTERNATIVE_NAME = "less"
ALTERNATIVE_PATH = "less.${PN}"
ALTERNATIVE_PRIORITY = "100"

Some files were not shown because too many files have changed in this diff Show More