Compare commits
36 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
bcee1864f4 | ||
|
7a05dfee17 | ||
|
b3884b6199 | ||
|
00a29b7cdd | ||
|
dc62df15c3 | ||
|
48f881d9ec | ||
|
ae5b60c6a1 | ||
|
34e875fab2 | ||
|
6925c68189 | ||
|
3e611c05a0 | ||
|
c55f31d05d | ||
|
efd32f8da0 | ||
|
0d6b893b6e | ||
|
56a9df0d91 | ||
|
4bec0ace93 | ||
|
b119ff1512 | ||
|
a58f35f819 | ||
|
7f806a278b | ||
|
0bdbc64c9d | ||
|
3c945c8317 | ||
|
de7f11af49 | ||
|
e5dfe9e074 | ||
|
36f155c8bb | ||
|
95ae6bbdd1 | ||
|
519a7c5bcb | ||
|
993b78d5a3 | ||
|
49f4723b0c | ||
|
c34a6d6d07 | ||
|
694b30dfe6 | ||
|
dae5f53f05 | ||
|
3ffc99baef | ||
|
9c4a278bbd | ||
|
f83aa1e94f | ||
|
539d55578b | ||
|
7a6a3abdcd | ||
|
ef864d2be6 |
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ make-3.82.tar.bz2
|
|||||||
/make-4.0.tar.bz2
|
/make-4.0.tar.bz2
|
||||||
/make-4.1.tar.bz2
|
/make-4.1.tar.bz2
|
||||||
/make-4.2.1.tar.bz2
|
/make-4.2.1.tar.bz2
|
||||||
|
/make-4.3.tar.gz
|
||||||
|
19
gating.yaml
Normal file
19
gating.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- fedora-*
|
||||||
|
decision_context: bodhi_update_push_stable
|
||||||
|
subject_type: koji_build
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-8
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-9
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
@ -1,151 +0,0 @@
|
|||||||
diff -Nrup a/job.c b/job.c
|
|
||||||
--- a/job.c 2015-10-29 17:19:17.209430335 -0400
|
|
||||||
+++ b/job.c 2015-10-29 18:24:04.452169281 -0400
|
|
||||||
@@ -1033,7 +1033,7 @@ free_child (struct child *child)
|
|
||||||
|
|
||||||
EINTRLOOP (r, write (job_fds[1], &token, 1));
|
|
||||||
if (r != 1)
|
|
||||||
- pfatal_with_name (_("write jobserver"));
|
|
||||||
+ pfatal_with_name_err (_("write jobserver"), errno);
|
|
||||||
|
|
||||||
DB (DB_JOBS, (_("Released token for child %p (%s).\n"),
|
|
||||||
child, child->file->name));
|
|
||||||
@@ -2008,6 +2008,7 @@ new_job (struct file *file)
|
|
||||||
#else
|
|
||||||
/* Set interruptible system calls, and read() for a job token. */
|
|
||||||
set_child_handler_action_flags (1, waiting_jobs != NULL);
|
|
||||||
+ errno = 0;
|
|
||||||
got_token = read (job_rfd, &token, 1);
|
|
||||||
saved_errno = errno;
|
|
||||||
set_child_handler_action_flags (0, waiting_jobs != NULL);
|
|
||||||
@@ -2024,10 +2025,14 @@ new_job (struct file *file)
|
|
||||||
#ifndef WINDOWS32
|
|
||||||
/* If the error _wasn't_ expected (EINTR or EBADF), punt. Otherwise,
|
|
||||||
go back and reap_children(), and try again. */
|
|
||||||
- errno = saved_errno;
|
|
||||||
- if (errno != EINTR && errno != EBADF)
|
|
||||||
- pfatal_with_name (_("read jobs pipe"));
|
|
||||||
- if (errno == EBADF)
|
|
||||||
+ if (saved_errno != EINTR && saved_errno != EBADF)
|
|
||||||
+ {
|
|
||||||
+ if (got_token == 0)
|
|
||||||
+ O (fatal, NILF, _("read jobs pipe EOF"));
|
|
||||||
+ else
|
|
||||||
+ pfatal_with_name_err (_("read jobs pipe"), saved_errno);
|
|
||||||
+ }
|
|
||||||
+ if (saved_errno == EBADF)
|
|
||||||
DB (DB_JOBS, ("Read returned EBADF.\n"));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -2170,7 +2175,9 @@ load_too_high (void)
|
|
||||||
O (error, NILF,
|
|
||||||
_("cannot enforce load limits on this operating system"));
|
|
||||||
else
|
|
||||||
- perror_with_name (_("cannot enforce load limit: "), "getloadavg");
|
|
||||||
+ perror_with_name_err (_("cannot enforce load limit: "),
|
|
||||||
+ "getloadavg", errno);
|
|
||||||
+
|
|
||||||
}
|
|
||||||
lossage = errno;
|
|
||||||
load = 0;
|
|
||||||
diff -Nrup a/main.c b/main.c
|
|
||||||
--- a/main.c 2015-10-29 17:19:17.198430225 -0400
|
|
||||||
+++ b/main.c 2015-10-29 19:12:15.599567039 -0400
|
|
||||||
@@ -1564,7 +1564,7 @@ main (int argc, char **argv, char **envp
|
|
||||||
|| (job_rfd = dup (job_fds[0])) < 0)
|
|
||||||
{
|
|
||||||
if (errno != EBADF)
|
|
||||||
- pfatal_with_name (_("dup jobserver"));
|
|
||||||
+ pfatal_with_name_err (_("dup jobserver"), errno);
|
|
||||||
|
|
||||||
O (error, NILF,
|
|
||||||
_("warning: jobserver unavailable: using -j1. Add '+' to parent make rule."));
|
|
||||||
@@ -1777,13 +1777,13 @@ main (int argc, char **argv, char **envp
|
|
||||||
strcat (template, DEFAULT_TMPFILE);
|
|
||||||
outfile = output_tmpfile (&stdin_nm, template);
|
|
||||||
if (outfile == 0)
|
|
||||||
- pfatal_with_name (_("fopen (temporary file)"));
|
|
||||||
+ pfatal_with_name_err (_("fopen (temporary file)"), errno);
|
|
||||||
while (!feof (stdin) && ! ferror (stdin))
|
|
||||||
{
|
|
||||||
char buf[2048];
|
|
||||||
unsigned int n = fread (buf, 1, sizeof (buf), stdin);
|
|
||||||
if (n > 0 && fwrite (buf, 1, n, outfile) != n)
|
|
||||||
- pfatal_with_name (_("fwrite (temporary file)"));
|
|
||||||
+ pfatal_with_name_err (_("fwrite (temporary file)"), errno);
|
|
||||||
}
|
|
||||||
fclose (outfile);
|
|
||||||
|
|
||||||
@@ -2019,7 +2019,8 @@ main (int argc, char **argv, char **envp
|
|
||||||
char c = '+';
|
|
||||||
|
|
||||||
if (pipe (job_fds) < 0 || (job_rfd = dup (job_fds[0])) < 0)
|
|
||||||
- pfatal_with_name (_("creating jobs pipe"));
|
|
||||||
+ pfatal_with_name_err (_("creating jobs pipe"), errno);
|
|
||||||
+
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Every make assumes that it always has one job it can run. For the
|
|
||||||
@@ -2039,7 +2040,7 @@ main (int argc, char **argv, char **envp
|
|
||||||
|
|
||||||
EINTRLOOP (r, write (job_fds[1], &c, 1));
|
|
||||||
if (r != 1)
|
|
||||||
- pfatal_with_name (_("init jobserver pipe"));
|
|
||||||
+ pfatal_with_name_err (_("init jobserver pipe"), errno);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -2464,7 +2465,7 @@ main (int argc, char **argv, char **envp
|
|
||||||
/* If there is a temp file from reading a makefile from stdin, get rid of
|
|
||||||
it now. */
|
|
||||||
if (stdin_nm && unlink (stdin_nm) < 0 && errno != ENOENT)
|
|
||||||
- perror_with_name (_("unlink (temporary file): "), stdin_nm);
|
|
||||||
+ perror_with_name_err (_("unlink (temporary file): "), stdin_nm, errno);
|
|
||||||
|
|
||||||
/* If there were no command-line goals, use the default. */
|
|
||||||
if (goals == 0)
|
|
||||||
diff -Nrup a/makeint.h b/makeint.h
|
|
||||||
--- a/makeint.h 2015-10-29 17:19:17.168429926 -0400
|
|
||||||
+++ b/makeint.h 2015-10-29 18:30:44.364147393 -0400
|
|
||||||
@@ -458,6 +458,8 @@ void fatal (const gmk_floc *flocp, size_
|
|
||||||
void die (int) __attribute__ ((noreturn));
|
|
||||||
void pfatal_with_name (const char *) __attribute__ ((noreturn));
|
|
||||||
void perror_with_name (const char *, const char *);
|
|
||||||
+void pfatal_with_name_err (const char *, int errnum) __attribute__ ((noreturn));
|
|
||||||
+void perror_with_name_err (const char *, const char *, int errnum);
|
|
||||||
#define xstrlen(_s) ((_s)==NULL ? 0 : strlen (_s))
|
|
||||||
void *xmalloc (unsigned int);
|
|
||||||
void *xcalloc (unsigned int);
|
|
||||||
diff -Nrup a/output.c b/output.c
|
|
||||||
--- a/output.c 2014-10-05 12:24:51.000000000 -0400
|
|
||||||
+++ b/output.c 2015-10-29 19:04:05.332692965 -0400
|
|
||||||
@@ -705,6 +705,13 @@ fatal (const gmk_floc *flocp, size_t len
|
|
||||||
/* Print an error message from errno. */
|
|
||||||
|
|
||||||
void
|
|
||||||
+perror_with_name_err (const char *str, const char *name, int errnum)
|
|
||||||
+{
|
|
||||||
+ const char *err = strerror (errnum);
|
|
||||||
+ OSSS (error, NILF, _("%s%s: %s"), str, name, err);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
perror_with_name (const char *str, const char *name)
|
|
||||||
{
|
|
||||||
const char *err = strerror (errno);
|
|
||||||
@@ -714,6 +721,15 @@ perror_with_name (const char *str, const
|
|
||||||
/* Print an error message from errno and exit. */
|
|
||||||
|
|
||||||
void
|
|
||||||
+pfatal_with_name_err (const char *name, int errnum)
|
|
||||||
+{
|
|
||||||
+ const char *err = strerror (errnum);
|
|
||||||
+ OSS (fatal, NILF, _("%s: %s"), name, err);
|
|
||||||
+
|
|
||||||
+ /* NOTREACHED */
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
pfatal_with_name (const char *name)
|
|
||||||
{
|
|
||||||
const char *err = strerror (errno);
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -Nrup a/makeint.h b/makeint.h
|
|
||||||
--- a/makeint.h 2013-10-09 00:22:40.000000000 -0400
|
|
||||||
+++ b/makeint.h 2014-02-03 17:46:24.969618708 -0500
|
|
||||||
@@ -528,7 +528,7 @@ long int lseek ();
|
|
||||||
#endif /* Not GNU C library or POSIX. */
|
|
||||||
|
|
||||||
#ifdef HAVE_GETCWD
|
|
||||||
-# if !defined(VMS) && !defined(__DECC)
|
|
||||||
+# if !defined(VMS) && !defined(__DECC) && !defined(getcwd)
|
|
||||||
char *getcwd ();
|
|
||||||
# endif
|
|
||||||
#else
|
|
@ -1,24 +0,0 @@
|
|||||||
diff -Nrup a/main.c b/main.c
|
|
||||||
--- a/main.c 2013-10-09 00:22:40.000000000 -0400
|
|
||||||
+++ b/main.c 2014-02-03 17:18:04.238609236 -0500
|
|
||||||
@@ -1987,6 +1987,20 @@ main (int argc, char **argv, char **envp
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#ifdef PIPE_BUF
|
|
||||||
+ if (job_slots > PIPE_BUF)
|
|
||||||
+#elif defined _POSIX_PIPE_BUF
|
|
||||||
+ if (job_slots > _POSIX_PIPE_BUF)
|
|
||||||
+#else
|
|
||||||
+ if (job_slots > 512)
|
|
||||||
+#endif
|
|
||||||
+ {
|
|
||||||
+ O (error, NILF,
|
|
||||||
+ _("More parallel jobs (-jN) than this platform can handle requested."));
|
|
||||||
+ O (error, NILF, _("Resetting to single job (-j1) mode."));
|
|
||||||
+ job_slots = 1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
#ifdef MAKE_JOBSERVER
|
|
||||||
/* If we have >1 slot but no jobserver-fds, then we're a top-level make.
|
|
||||||
Set up the pipe and install the fds option for our children. */
|
|
@ -1,19 +0,0 @@
|
|||||||
diff -Nrup a/job.c b/job.c
|
|
||||||
--- a/job.c 2014-02-03 18:23:45.936436714 -0500
|
|
||||||
+++ b/job.c 2014-02-04 00:17:53.232074893 -0500
|
|
||||||
@@ -3269,13 +3269,14 @@ construct_command_argv_internal (char *l
|
|
||||||
#endif
|
|
||||||
if (PRESERVE_BSNL)
|
|
||||||
{
|
|
||||||
- *(ap++) = '\\';
|
|
||||||
+ *(ap++) = '\'';
|
|
||||||
/* Only non-batch execution needs another backslash,
|
|
||||||
because it will be passed through a recursive
|
|
||||||
invocation of this function. */
|
|
||||||
if (!batch_mode_shell)
|
|
||||||
*(ap++) = '\\';
|
|
||||||
*(ap++) = '\n';
|
|
||||||
+ *(ap++) = '\'';
|
|
||||||
}
|
|
||||||
++p;
|
|
||||||
continue;
|
|
@ -1,16 +0,0 @@
|
|||||||
diff -up make-3.82/job.c\~ make-3.82/job.c
|
|
||||||
--- make-3.82/job.c~ 2010-08-11 16:13:33.000000000 +0200
|
|
||||||
+++ make-3.82/job.c 2010-08-12 14:20:08.000000000 +0200
|
|
||||||
@@ -2442,7 +2442,11 @@ construct_command_argv_internal (char *l
|
|
||||||
|
|
||||||
/* See if it is safe to parse commands internally. */
|
|
||||||
if (shell == 0)
|
|
||||||
- shell = default_shell;
|
|
||||||
+ {
|
|
||||||
+ shell = default_shell;
|
|
||||||
+ if (shellflags == 0)
|
|
||||||
+ shellflags = "-c";
|
|
||||||
+ }
|
|
||||||
#ifdef WINDOWS32
|
|
||||||
else if (strcmp (shell, default_shell))
|
|
||||||
{
|
|
@ -1,51 +0,0 @@
|
|||||||
commit 292da6f6867b75a5af7ddbb639a1feae022f438f
|
|
||||||
Author: Paul Smith <psmith@gnu.org>
|
|
||||||
Date: Mon Oct 20 01:54:56 2014 -0400
|
|
||||||
|
|
||||||
* main.c (main): [SV 43434] Handle NULL returns from ttyname().
|
|
||||||
|
|
||||||
diff --git a/main.c b/main.c
|
|
||||||
index b2d169c..0cdb8a8 100644
|
|
||||||
--- a/main.c
|
|
||||||
+++ b/main.c
|
|
||||||
@@ -1429,13 +1429,18 @@ main (int argc, char **argv, char **envp)
|
|
||||||
#ifdef HAVE_ISATTY
|
|
||||||
if (isatty (fileno (stdout)))
|
|
||||||
if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMOUT")))
|
|
||||||
- define_variable_cname ("MAKE_TERMOUT", TTYNAME (fileno (stdout)),
|
|
||||||
- o_default, 0)->export = v_export;
|
|
||||||
-
|
|
||||||
+ {
|
|
||||||
+ const char *tty = TTYNAME (fileno (stdout));
|
|
||||||
+ define_variable_cname ("MAKE_TERMOUT", tty ? tty : DEFAULT_TTYNAME,
|
|
||||||
+ o_default, 0)->export = v_export;
|
|
||||||
+ }
|
|
||||||
if (isatty (fileno (stderr)))
|
|
||||||
if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMERR")))
|
|
||||||
- define_variable_cname ("MAKE_TERMERR", TTYNAME (fileno (stderr)),
|
|
||||||
- o_default, 0)->export = v_export;
|
|
||||||
+ {
|
|
||||||
+ const char *tty = TTYNAME (fileno (stderr));
|
|
||||||
+ define_variable_cname ("MAKE_TERMERR", tty ? tty : DEFAULT_TTYNAME,
|
|
||||||
+ o_default, 0)->export = v_export;
|
|
||||||
+ }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Reset in case the switches changed our minds. */
|
|
||||||
diff --git a/makeint.h b/makeint.h
|
|
||||||
index 6223936..2009f41 100644
|
|
||||||
--- a/makeint.h
|
|
||||||
+++ b/makeint.h
|
|
||||||
@@ -436,10 +436,11 @@ extern struct rlimit stack_limit;
|
|
||||||
/* The number of bytes needed to represent the largest integer as a string. */
|
|
||||||
#define INTSTR_LENGTH CSTRLEN ("18446744073709551616")
|
|
||||||
|
|
||||||
+#define DEFAULT_TTYNAME "true"
|
|
||||||
#ifdef HAVE_TTYNAME
|
|
||||||
# define TTYNAME(_f) ttyname (_f)
|
|
||||||
#else
|
|
||||||
-# define TTYNAME(_f) "true"
|
|
||||||
+# define TTYNAME(_f) DEFAULT_TTYNAME
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
36
make-4.3-cloexec.patch
Normal file
36
make-4.3-cloexec.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From d79fe162c009788888faaf0317253b6f0cac7092 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kevin Buettner <kevinb@redhat.com>
|
||||||
|
Date: Thu, 23 Apr 2020 17:05:34 -0400
|
||||||
|
Subject: [SV 58232] Disable inheritance of jobserver FDs for recursive make
|
||||||
|
|
||||||
|
A parent make will invoke a sub-make with close-on-exec disabled for
|
||||||
|
the jobserver pipe FDs. Force close-on-exec to be to be enabled in
|
||||||
|
the sub-make so the pipe is not always passed to child jobs.
|
||||||
|
|
||||||
|
I have a test case which, when invoked with a suitable -j switch,
|
||||||
|
will hang if the recipe inherits the jobserver pipe. This test case
|
||||||
|
was inspired by a real world case in which testing GDB on Fedora
|
||||||
|
would hang due to some poorly written test GDB cases having been
|
||||||
|
passed the jobserver file descriptors.
|
||||||
|
|
||||||
|
* src/posixos.c (jobserver_parse_auth): Call fd_noinherit() for
|
||||||
|
jobserver pipe descriptors.
|
||||||
|
|
||||||
|
Copyright-paperwork-exempt: yes
|
||||||
|
|
||||||
|
diff --git a/src/posixos.c b/src/posixos.c
|
||||||
|
index 525f292c..eab175a4 100644
|
||||||
|
--- a/src/posixos.c
|
||||||
|
+++ b/src/posixos.c
|
||||||
|
@@ -145,6 +145,11 @@ jobserver_parse_auth (const char *auth)
|
||||||
|
/* When using pselect() we want the read to be non-blocking. */
|
||||||
|
set_blocking (job_fds[0], 0);
|
||||||
|
|
||||||
|
+ /* By default we don't send the job pipe FDs to our children.
|
||||||
|
+ See jobserver_pre_child() and jobserver_post_child(). */
|
||||||
|
+ fd_noinherit (job_fds[0]);
|
||||||
|
+ fd_noinherit (job_fds[1]);
|
||||||
|
+
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
268
make-4.3-filter-out.patch
Normal file
268
make-4.3-filter-out.patch
Normal file
@ -0,0 +1,268 @@
|
|||||||
|
From e49e11e069fe7f214263be1782242b9b50f71eaa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Smith <psmith@gnu.org>
|
||||||
|
Date: Thu, 12 Nov 2020 17:00:39 -0500
|
||||||
|
Subject: [SV 59093] Rewrite filter/filter-out to avoid large stack usage
|
||||||
|
|
||||||
|
* src/function.c (func_filter_filterout): Allocate arrays to hold
|
||||||
|
pattern and word information rather than creating linked lists on
|
||||||
|
the stack.
|
||||||
|
* tests/scripts/functions/filter-out: Test large filters.
|
||||||
|
|
||||||
|
diff --git a/src/function.c b/src/function.c
|
||||||
|
index 0917e0cd..5edfe8b3 100644
|
||||||
|
--- a/src/function.c
|
||||||
|
+++ b/src/function.c
|
||||||
|
@@ -910,7 +910,6 @@ func_foreach (char *o, char **argv, const char *funcname UNUSED)
|
||||||
|
|
||||||
|
struct a_word
|
||||||
|
{
|
||||||
|
- struct a_word *next;
|
||||||
|
struct a_word *chain;
|
||||||
|
char *str;
|
||||||
|
size_t length;
|
||||||
|
@@ -941,7 +940,6 @@ a_word_hash_cmp (const void *x, const void *y)
|
||||||
|
|
||||||
|
struct a_pattern
|
||||||
|
{
|
||||||
|
- struct a_pattern *next;
|
||||||
|
char *str;
|
||||||
|
char *percent;
|
||||||
|
size_t length;
|
||||||
|
@@ -950,78 +948,84 @@ struct a_pattern
|
||||||
|
static char *
|
||||||
|
func_filter_filterout (char *o, char **argv, const char *funcname)
|
||||||
|
{
|
||||||
|
- struct a_word *wordhead;
|
||||||
|
- struct a_word **wordtail;
|
||||||
|
+ struct a_word *words;
|
||||||
|
+ struct a_word *word_end;
|
||||||
|
struct a_word *wp;
|
||||||
|
- struct a_pattern *pathead;
|
||||||
|
- struct a_pattern **pattail;
|
||||||
|
+ struct a_pattern *patterns;
|
||||||
|
+ struct a_pattern *pat_end;
|
||||||
|
struct a_pattern *pp;
|
||||||
|
+ size_t pat_count = 0, word_count = 0;
|
||||||
|
|
||||||
|
struct hash_table a_word_table;
|
||||||
|
int is_filter = funcname[CSTRLEN ("filter")] == '\0';
|
||||||
|
- const char *pat_iterator = argv[0];
|
||||||
|
- const char *word_iterator = argv[1];
|
||||||
|
+ const char *cp;
|
||||||
|
int literals = 0;
|
||||||
|
- int words = 0;
|
||||||
|
int hashing = 0;
|
||||||
|
char *p;
|
||||||
|
size_t len;
|
||||||
|
+ int doneany = 0;
|
||||||
|
|
||||||
|
- /* Chop ARGV[0] up into patterns to match against the words.
|
||||||
|
- We don't need to preserve it because our caller frees all the
|
||||||
|
- argument memory anyway. */
|
||||||
|
+ /* Find the number of words and get memory for them. */
|
||||||
|
+ cp = argv[1];
|
||||||
|
+ while ((p = find_next_token (&cp, NULL)) != 0)
|
||||||
|
+ ++word_count;
|
||||||
|
|
||||||
|
- pattail = &pathead;
|
||||||
|
- while ((p = find_next_token (&pat_iterator, &len)) != 0)
|
||||||
|
- {
|
||||||
|
- struct a_pattern *pat = alloca (sizeof (struct a_pattern));
|
||||||
|
+ if (!word_count)
|
||||||
|
+ return o;
|
||||||
|
+
|
||||||
|
+ words = xcalloc (word_count * sizeof (struct a_word));
|
||||||
|
+ word_end = words + word_count;
|
||||||
|
|
||||||
|
- *pattail = pat;
|
||||||
|
- pattail = &pat->next;
|
||||||
|
+ /* Find the number of patterns and get memory for them. */
|
||||||
|
+ cp = argv[0];
|
||||||
|
+ while ((p = find_next_token (&cp, NULL)) != 0)
|
||||||
|
+ ++pat_count;
|
||||||
|
|
||||||
|
- if (*pat_iterator != '\0')
|
||||||
|
- ++pat_iterator;
|
||||||
|
+ patterns = xcalloc (pat_count * sizeof (struct a_pattern));
|
||||||
|
+ pat_end = patterns + pat_count;
|
||||||
|
+
|
||||||
|
+ /* Chop argv[0] up into patterns to match against the words. */
|
||||||
|
+
|
||||||
|
+ cp = argv[0];
|
||||||
|
+ pp = patterns;
|
||||||
|
+ while ((p = find_next_token (&cp, &len)) != 0)
|
||||||
|
+ {
|
||||||
|
+ if (*cp != '\0')
|
||||||
|
+ ++cp;
|
||||||
|
|
||||||
|
- pat->str = p;
|
||||||
|
p[len] = '\0';
|
||||||
|
- pat->percent = find_percent (p);
|
||||||
|
- if (pat->percent == 0)
|
||||||
|
+ pp->str = p;
|
||||||
|
+ pp->percent = find_percent (p);
|
||||||
|
+ if (pp->percent == 0)
|
||||||
|
literals++;
|
||||||
|
-
|
||||||
|
/* find_percent() might shorten the string so LEN is wrong. */
|
||||||
|
- pat->length = strlen (pat->str);
|
||||||
|
+ pp->length = strlen (pp->str);
|
||||||
|
+
|
||||||
|
+ ++pp;
|
||||||
|
}
|
||||||
|
- *pattail = 0;
|
||||||
|
|
||||||
|
/* Chop ARGV[1] up into words to match against the patterns. */
|
||||||
|
|
||||||
|
- wordtail = &wordhead;
|
||||||
|
- while ((p = find_next_token (&word_iterator, &len)) != 0)
|
||||||
|
+ cp = argv[1];
|
||||||
|
+ wp = words;
|
||||||
|
+ while ((p = find_next_token (&cp, &len)) != 0)
|
||||||
|
{
|
||||||
|
- struct a_word *word = alloca (sizeof (struct a_word));
|
||||||
|
-
|
||||||
|
- *wordtail = word;
|
||||||
|
- wordtail = &word->next;
|
||||||
|
-
|
||||||
|
- if (*word_iterator != '\0')
|
||||||
|
- ++word_iterator;
|
||||||
|
+ if (*cp != '\0')
|
||||||
|
+ ++cp;
|
||||||
|
|
||||||
|
p[len] = '\0';
|
||||||
|
- word->str = p;
|
||||||
|
- word->length = len;
|
||||||
|
- word->matched = 0;
|
||||||
|
- word->chain = 0;
|
||||||
|
- words++;
|
||||||
|
+ wp->str = p;
|
||||||
|
+ wp->length = len;
|
||||||
|
+ ++wp;
|
||||||
|
}
|
||||||
|
- *wordtail = 0;
|
||||||
|
|
||||||
|
/* Only use a hash table if arg list lengths justifies the cost. */
|
||||||
|
- hashing = (literals >= 2 && (literals * words) >= 10);
|
||||||
|
+ hashing = (literals > 1 && (literals * word_count) >= 10);
|
||||||
|
if (hashing)
|
||||||
|
{
|
||||||
|
- hash_init (&a_word_table, words, a_word_hash_1, a_word_hash_2,
|
||||||
|
+ hash_init (&a_word_table, word_count, a_word_hash_1, a_word_hash_2,
|
||||||
|
a_word_hash_cmp);
|
||||||
|
- for (wp = wordhead; wp != 0; wp = wp->next)
|
||||||
|
+ for (wp = words; wp < word_end; ++wp)
|
||||||
|
{
|
||||||
|
struct a_word *owp = hash_insert (&a_word_table, wp);
|
||||||
|
if (owp)
|
||||||
|
@@ -1029,51 +1033,49 @@ func_filter_filterout (char *o, char **argv, const char *funcname)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (words)
|
||||||
|
+ /* Run each pattern through the words, killing words. */
|
||||||
|
+ for (pp = patterns; pp < pat_end; ++pp)
|
||||||
|
{
|
||||||
|
- int doneany = 0;
|
||||||
|
-
|
||||||
|
- /* Run each pattern through the words, killing words. */
|
||||||
|
- for (pp = pathead; pp != 0; pp = pp->next)
|
||||||
|
+ if (pp->percent)
|
||||||
|
+ for (wp = words; wp < word_end; ++wp)
|
||||||
|
+ wp->matched |= pattern_matches (pp->str, pp->percent, wp->str);
|
||||||
|
+ else if (hashing)
|
||||||
|
{
|
||||||
|
- if (pp->percent)
|
||||||
|
- for (wp = wordhead; wp != 0; wp = wp->next)
|
||||||
|
- wp->matched |= pattern_matches (pp->str, pp->percent, wp->str);
|
||||||
|
- else if (hashing)
|
||||||
|
+ struct a_word a_word_key;
|
||||||
|
+ a_word_key.str = pp->str;
|
||||||
|
+ a_word_key.length = pp->length;
|
||||||
|
+ wp = hash_find_item (&a_word_table, &a_word_key);
|
||||||
|
+ while (wp)
|
||||||
|
{
|
||||||
|
- struct a_word a_word_key;
|
||||||
|
- a_word_key.str = pp->str;
|
||||||
|
- a_word_key.length = pp->length;
|
||||||
|
- wp = hash_find_item (&a_word_table, &a_word_key);
|
||||||
|
- while (wp)
|
||||||
|
- {
|
||||||
|
- wp->matched |= 1;
|
||||||
|
- wp = wp->chain;
|
||||||
|
- }
|
||||||
|
+ wp->matched |= 1;
|
||||||
|
+ wp = wp->chain;
|
||||||
|
}
|
||||||
|
- else
|
||||||
|
- for (wp = wordhead; wp != 0; wp = wp->next)
|
||||||
|
- wp->matched |= (wp->length == pp->length
|
||||||
|
- && strneq (pp->str, wp->str, wp->length));
|
||||||
|
}
|
||||||
|
+ else
|
||||||
|
+ for (wp = words; wp < word_end; ++wp)
|
||||||
|
+ wp->matched |= (wp->length == pp->length
|
||||||
|
+ && strneq (pp->str, wp->str, wp->length));
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- /* Output the words that matched (or didn't, for filter-out). */
|
||||||
|
- for (wp = wordhead; wp != 0; wp = wp->next)
|
||||||
|
- if (is_filter ? wp->matched : !wp->matched)
|
||||||
|
- {
|
||||||
|
- o = variable_buffer_output (o, wp->str, strlen (wp->str));
|
||||||
|
- o = variable_buffer_output (o, " ", 1);
|
||||||
|
- doneany = 1;
|
||||||
|
- }
|
||||||
|
+ /* Output the words that matched (or didn't, for filter-out). */
|
||||||
|
+ for (wp = words; wp < word_end; ++wp)
|
||||||
|
+ if (is_filter ? wp->matched : !wp->matched)
|
||||||
|
+ {
|
||||||
|
+ o = variable_buffer_output (o, wp->str, strlen (wp->str));
|
||||||
|
+ o = variable_buffer_output (o, " ", 1);
|
||||||
|
+ doneany = 1;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- if (doneany)
|
||||||
|
- /* Kill the last space. */
|
||||||
|
- --o;
|
||||||
|
- }
|
||||||
|
+ if (doneany)
|
||||||
|
+ /* Kill the last space. */
|
||||||
|
+ --o;
|
||||||
|
|
||||||
|
if (hashing)
|
||||||
|
hash_free (&a_word_table, 0);
|
||||||
|
|
||||||
|
+ free (patterns);
|
||||||
|
+ free (words);
|
||||||
|
+
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/tests/scripts/functions/filter-out b/tests/scripts/functions/filter-out
|
||||||
|
index 1fe4819d..dec5343e 100644
|
||||||
|
--- a/tests/scripts/functions/filter-out
|
||||||
|
+++ b/tests/scripts/functions/filter-out
|
||||||
|
@@ -27,6 +27,22 @@ all: ; @echo '$(files1) $(files2)'
|
||||||
|
!,
|
||||||
|
'', "foo.elc foo.elc\n");
|
||||||
|
|
||||||
|
+# Force use of hash (see function.c:func_filter_filterout for params)
|
||||||
|
+
|
||||||
|
+my $base = 'foo.1 foo.2 foo.3 foo.4 foo.5 foo.6 foo.7 foo.8 foo.9 foo.10';
|
||||||
|
+
|
||||||
|
+my $base10 = join(' ', ($base) x 10);
|
||||||
|
+my $out3 = join(' ', ('foo.3') x 10);
|
||||||
|
+my $out456 = join(' ', ('foo.4 foo.5 foo.6') x 10);
|
||||||
|
+
|
||||||
|
+run_make_test("words := $base10" . q!
|
||||||
|
+files1 := $(filter %.3, $(words))
|
||||||
|
+files2 := $(filter %.4 foo.5 foo.6, $(words))
|
||||||
|
+all: ; @echo '$(files1) $(files2)'
|
||||||
|
+!,
|
||||||
|
+ '', "$out3 $out456\n");
|
||||||
|
+
|
||||||
|
+
|
||||||
|
# Escaped patterns
|
||||||
|
run_make_test(q!all:;@echo '$(filter foo\%bar,foo%bar fooXbar)'!,
|
||||||
|
'', "foo%bar\n");
|
@ -1,6 +1,6 @@
|
|||||||
diff -Nrup a/makeint.h b/makeint.h
|
diff -Nrup a/src/makeint.h b/src/makeint.h
|
||||||
--- a/makeint.h 2016-05-21 16:22:32.000000000 -0400
|
--- a/src/makeint.h 2016-05-21 16:22:32.000000000 -0400
|
||||||
+++ b/makeint.h 2016-09-22 16:12:38.606702160 -0400
|
+++ b/src/makeint.h 2016-09-22 16:12:38.606702160 -0400
|
||||||
@@ -596,7 +596,7 @@ long int lseek ();
|
@@ -596,7 +596,7 @@ long int lseek ();
|
||||||
# endif
|
# endif
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
diff -Nrup a/main.c b/main.c
|
diff -Nrup a/src/main.c b/src/main.c
|
||||||
--- a/main.c 2016-05-31 03:17:26.000000000 -0400
|
--- a/src/main.c 2016-05-31 03:17:26.000000000 -0400
|
||||||
+++ b/main.c 2016-09-22 16:18:52.283889265 -0400
|
+++ b/src/main.c 2016-09-22 16:18:52.283889265 -0400
|
||||||
@@ -2051,6 +2051,21 @@ main (int argc, char **argv, char **envp
|
@@ -2051,6 +2051,21 @@ main (int argc, char **argv, char **envp
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
@ -1,25 +0,0 @@
|
|||||||
From 3271ba0553cd8805ea0669edd67b16f4ecee332e Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Sat, 24 Oct 2015 18:18:04 -0400
|
|
||||||
Subject: [PATCH] getcwd
|
|
||||||
|
|
||||||
---
|
|
||||||
makeint.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git makeint.h makeint.h
|
|
||||||
index fdcae75bd2..98c022deac 100644
|
|
||||||
--- makeint.h
|
|
||||||
+++ makeint.h
|
|
||||||
@@ -548,7 +548,7 @@ long int lseek ();
|
|
||||||
#endif /* Not GNU C library or POSIX. */
|
|
||||||
|
|
||||||
#ifdef HAVE_GETCWD
|
|
||||||
-# if !defined(VMS) && !defined(__DECC)
|
|
||||||
+# if !defined(VMS) && !defined(__DECC) && !defined(getcwd)
|
|
||||||
char *getcwd ();
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From 5467b24cddaa4c5d108f98b8266fe787d778c9d0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Sat, 24 Oct 2015 18:19:30 -0400
|
|
||||||
Subject: [PATCH] newlines
|
|
||||||
|
|
||||||
---
|
|
||||||
job.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git job.c job.c
|
|
||||||
index 2989249063..7e5bae2a56 100644
|
|
||||||
--- job.c
|
|
||||||
+++ job.c
|
|
||||||
@@ -3320,13 +3320,14 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
|
||||||
#endif
|
|
||||||
if (PRESERVE_BSNL)
|
|
||||||
{
|
|
||||||
- *(ap++) = '\\';
|
|
||||||
+ *(ap++) = '\'';
|
|
||||||
/* Only non-batch execution needs another backslash,
|
|
||||||
because it will be passed through a recursive
|
|
||||||
invocation of this function. */
|
|
||||||
if (!batch_mode_shell)
|
|
||||||
*(ap++) = '\\';
|
|
||||||
*(ap++) = '\n';
|
|
||||||
+ *(ap++) = '\'';
|
|
||||||
}
|
|
||||||
++p;
|
|
||||||
continue;
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
222
make.spec
222
make.spec
@ -1,37 +1,81 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
Summary: A GNU tool which simplifies the build process for users
|
# This decides the SRPM name. Set to "make" for a rolling release
|
||||||
|
# (like Fedora) or "make-latest" for a long term release that needs
|
||||||
|
# optional versioned updates.
|
||||||
Name: make
|
Name: make
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 4.2.1
|
Version: 4.3
|
||||||
Release: 2%{?dist}
|
Release: 11%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Development/Tools
|
|
||||||
URL: http://www.gnu.org/software/make/
|
URL: http://www.gnu.org/software/make/
|
||||||
Source: ftp://ftp.gnu.org/gnu/make/make-%{version}.tar.bz2
|
Source: ftp://ftp.gnu.org/gnu/make/make-%{version}.tar.gz
|
||||||
|
|
||||||
Patch0: make-4.2-getcwd.patch
|
%if "%{name}" != "make"
|
||||||
Patch1: make-4.0-newlines.patch
|
# Set this to the sub-package base name, for "make-latest"
|
||||||
|
%global make make43
|
||||||
|
%if 0%{?rhel} > 0
|
||||||
|
%global _prefix /opt/rh/%{make}
|
||||||
|
%else
|
||||||
|
# We intentionally do not define a case for Fedora, as it should not
|
||||||
|
# need this functionality, and letting it error avoids accidents.
|
||||||
|
%{error:"Each downstream must specify its own /opt namespace"}
|
||||||
|
%endif
|
||||||
|
Summary: Meta package to include latest version of make
|
||||||
|
%else
|
||||||
|
%global make %{name}
|
||||||
|
Summary: A GNU tool which simplifies the build process for users
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel} > 0
|
||||||
|
# This gives the user the option of saying --with guile, but defaults to WITHOUT
|
||||||
|
%bcond_with guile
|
||||||
|
%else
|
||||||
|
# This gives the user the option of saying --without guile, but defaults to WITH
|
||||||
|
%bcond_without guile
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Patch0: make-4.3-getcwd.patch
|
||||||
|
|
||||||
# Assume we don't have clock_gettime in configure, so that
|
# Assume we don't have clock_gettime in configure, so that
|
||||||
# make is not linked against -lpthread (and thus does not
|
# make is not linked against -lpthread (and thus does not
|
||||||
# limit stack to 2MB).
|
# limit stack to 2MB).
|
||||||
Patch2: make-4.0-noclock_gettime.patch
|
Patch1: make-4.0-noclock_gettime.patch
|
||||||
|
|
||||||
# BZs #142691, #17374
|
# BZs #142691, #17374
|
||||||
Patch3: make-4.2-j8k.patch
|
Patch2: make-4.3-j8k.patch
|
||||||
|
|
||||||
# Upstream: https://savannah.gnu.org/bugs/?30748
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1827850
|
||||||
# The default value of .SHELL_FLAGS is -c.
|
# https://savannah.gnu.org/bugs/?58232
|
||||||
Patch4: make-4.0-weird-shell.patch
|
# Remove on next make rebase
|
||||||
|
Patch3: make-4.3-cloexec.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2010506
|
||||||
Requires(post): /sbin/install-info
|
# https://savannah.gnu.org/bugs/?59093
|
||||||
Requires(preun): /sbin/install-info
|
# Remove on next make rebase
|
||||||
|
Patch4: make-4.3-filter-out.patch
|
||||||
|
|
||||||
|
# autoreconf
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: autoconf, automake, gettext-devel
|
||||||
BuildRequires: procps
|
BuildRequires: procps
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: guile-devel
|
%if %{with guile}
|
||||||
|
BuildRequires: pkgconfig(guile-2.2)
|
||||||
|
%endif
|
||||||
|
BuildRequires: gcc
|
||||||
|
|
||||||
%description
|
%if "%{name}" != "make"
|
||||||
|
# We're still on the make-latest package
|
||||||
|
Requires: %{make}
|
||||||
|
%description -n make-latest
|
||||||
|
The latest GNU Make, with a version-specific install
|
||||||
|
%files -n make-latest
|
||||||
|
|
||||||
|
%package -n %{make}
|
||||||
|
Summary: A GNU tool which simplifies the build process for users
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description -n %{make}
|
||||||
A GNU tool for controlling the generation of executables and other
|
A GNU tool for controlling the generation of executables and other
|
||||||
non-source files of a program from the program's source files. Make
|
non-source files of a program from the program's source files. Make
|
||||||
allows users to build and install packages without any significant
|
allows users to build and install packages without any significant
|
||||||
@ -39,70 +83,146 @@ knowledge about the details of the build process. The details about
|
|||||||
how the program should be built are provided for make in the program's
|
how the program should be built are provided for make in the program's
|
||||||
makefile.
|
makefile.
|
||||||
|
|
||||||
%package devel
|
%package -n %{make}-devel
|
||||||
Summary: Header file for externally visible definitions
|
Summary: Header file for externally visible definitions
|
||||||
Group: Development/Libraries
|
|
||||||
|
|
||||||
%description devel
|
%description -n %{make}-devel
|
||||||
The make-devel package contains gnumake.h.
|
The %{make}-devel package contains gnumake.h.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -n make-%{version} -p1
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
|
|
||||||
rm -f tests/scripts/features/parallelism.orig
|
rm -f tests/scripts/features/parallelism.orig
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-guile
|
autoreconf -vfi
|
||||||
make %{?_smp_mflags}
|
|
||||||
|
%configure \
|
||||||
|
%if %{with guile}
|
||||||
|
--with-guile
|
||||||
|
%else
|
||||||
|
--without-guile
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%make_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
%make_install
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
|
||||||
ln -sf make ${RPM_BUILD_ROOT}/%{_bindir}/gmake
|
ln -sf make ${RPM_BUILD_ROOT}/%{_bindir}/gmake
|
||||||
ln -sf make.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1/gmake.1
|
ln -sf make.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1/gmake.1
|
||||||
rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir
|
rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir
|
||||||
|
|
||||||
%find_lang %name
|
%if "%{name}" != "make"
|
||||||
|
install -d -m 755 ${RPM_BUILD_ROOT}/etc/scl/prefixes
|
||||||
|
dirname %{_prefix} > %{make}.prefix
|
||||||
|
install -p -m 644 %{make}.prefix ${RPM_BUILD_ROOT}/etc/scl/prefixes/%{make}
|
||||||
|
|
||||||
|
echo "export PATH=%{_prefix}/bin:\$PATH" > enable.scl
|
||||||
|
install -p -m 755 enable.scl ${RPM_BUILD_ROOT}/%{_prefix}/enable
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%find_lang make
|
||||||
|
|
||||||
%check
|
%check
|
||||||
echo ============TESTING===============
|
echo ============TESTING===============
|
||||||
/usr/bin/env LANG=C make check && true
|
/usr/bin/env LANG=C make check && true
|
||||||
echo ============END TESTING===========
|
echo ============END TESTING===========
|
||||||
|
|
||||||
%clean
|
%files -n %{make} -f make.lang
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
|
||||||
|
|
||||||
%post
|
|
||||||
if [ -f %{_infodir}/make.info.gz ]; then # for --excludedocs
|
|
||||||
/sbin/install-info %{_infodir}/make.info.gz %{_infodir}/dir --entry="* Make: (make). The GNU make utility." || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%preun
|
|
||||||
if [ $1 = 0 ]; then
|
|
||||||
if [ -f %{_infodir}/make.info.gz ]; then # for --excludedocs
|
|
||||||
/sbin/install-info --delete %{_infodir}/make.info.gz %{_infodir}/dir --entry="* Make: (make). The GNU make utility." || :
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files -f %{name}.lang
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc NEWS README AUTHORS
|
%doc NEWS README AUTHORS
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
%{_infodir}/*.info*
|
%{_infodir}/*.info*
|
||||||
%{_includedir}/gnumake.h
|
%{_includedir}/gnumake.h
|
||||||
|
%if "%{name}" != "make"
|
||||||
|
/etc/scl/prefixes/%{make}
|
||||||
|
%{_prefix}/enable
|
||||||
|
%endif
|
||||||
|
|
||||||
%files devel
|
%files -n %{make}-devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_includedir}/gnumake.h
|
%{_includedir}/gnumake.h
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.3-11
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 14 2022 DJ Delorie <dj@redhat.com> - 1:4.3-10
|
||||||
|
- Add SCL compatibility to LTS builds.
|
||||||
|
|
||||||
|
* Wed Jun 29 2022 DJ Delorie <dj@redhat.com> - 1:4.3-9
|
||||||
|
- Enable long-term supported builds.
|
||||||
|
|
||||||
|
* Fri Apr 8 2022 DJ Delorie <dj@redhat.com> - 1:4.3-8
|
||||||
|
- Rewrite filter/filter-out to avoid large stack usage. BZ #2010506
|
||||||
|
- Require perl core modules for testsuite
|
||||||
|
|
||||||
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.3-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.3-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Feb 19 2021 DJ Delorie <dj@redhat.com> - 1:4.3-5
|
||||||
|
- Allow users to build with or without guile support as desired.
|
||||||
|
- Allow derivative downstreams to default to disabling guile support.
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.3-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 DJ Delorie <dj@redhat.com> - 1:4.3-3
|
||||||
|
- Disable inheritance of jobserver FDs for recursive make. BZ #1827850
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.3-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Mar 11 2020 DJ Delorie <dj@redhat.com> - 1:4.3-1
|
||||||
|
- Rebase to make-4.3. Remove obsolete patches.
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-16
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Dec 06 2019 DJ Delorie <dj@redhat.com> - 1:4.2.1-15
|
||||||
|
- Use a non-blocking read with pselect to avoid hangs. BZ #1556839
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-14
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:4.2.1-13
|
||||||
|
- Run autoreconf
|
||||||
|
|
||||||
|
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:4.2.1-12
|
||||||
|
- Switch to latest guile version
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-11
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Apr 25 2018 Patsy Griffin Franklin <pfrankli@redhat.com> 1:4.2.1-9
|
||||||
|
- Fix build failure caused by automake versioning differences related
|
||||||
|
to the glob changes.
|
||||||
|
- Fix testing failure due to Perl changes related to expanding paths.
|
||||||
|
|
||||||
|
* Tue Feb 20 2018 Rex Dieter <rdieter@fedoraproject.org> - 1:4.2.1-8
|
||||||
|
- BR: gcc, rebuild (guile)
|
||||||
|
|
||||||
|
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:4.2.1-6
|
||||||
|
- Fix wrong assumptions of glibc's glob internals
|
||||||
|
|
||||||
|
* Thu Feb 01 2018 Richard W.M. Jones <rjones@redhat.com> - 1:4.2.1-5
|
||||||
|
- Add upstream patch to fix incorrect use of glibc 2.27 glob internals.
|
||||||
|
|
||||||
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.2.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
* Wed Feb 01 2017 Stephen Gallagher <sgallagh@redhat.com> - 4.2.1-2
|
* Wed Feb 01 2017 Stephen Gallagher <sgallagh@redhat.com> - 4.2.1-2
|
||||||
- Add missing %%license macro
|
- Add missing %%license macro
|
||||||
|
|
||||||
|
6
plans/ci.fmf
Normal file
6
plans/ci.fmf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
summary: CI Gating Plan
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
directory: tests
|
||||||
|
execute:
|
||||||
|
how: beakerlib
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
15b012617e7c44c0ed482721629577ac make-4.2.1.tar.bz2
|
SHA512 (make-4.3.tar.gz) = 9a1185cc468368f4ec06478b1cfa343bf90b5cd7c92c0536567db0315b0ee909af53ecce3d44cfd93dd137dbca1ed13af5713e8663590c4fdd21ea635d78496b
|
||||||
|
@ -0,0 +1,63 @@
|
|||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Makefile of /tools/make/Regression/GNU-make-utility-v-3-82-shipped-with-el7-breaks
|
||||||
|
# Description: Test for GNU make utility v.3.82 shipped with el7 breaks
|
||||||
|
# Author: Michal Kolar <mkolar@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Red Hat, 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 of
|
||||||
|
# the License, 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, see http://www.gnu.org/licenses/.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export TEST=/tools/make/Regression/GNU-make-utility-v-3-82-shipped-with-el7-breaks
|
||||||
|
export TESTVERSION=1.0
|
||||||
|
|
||||||
|
BUILT_FILES=
|
||||||
|
|
||||||
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE test.mk golden.output
|
||||||
|
|
||||||
|
.PHONY: all install download clean
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./runtest.sh
|
||||||
|
|
||||||
|
build: $(BUILT_FILES)
|
||||||
|
test -x runtest.sh || chmod a+x runtest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ $(BUILT_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
include /usr/share/rhts/lib/rhts-make.include
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@echo "Owner: Michal Kolar <mkolar@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: GNU make utility v.3.82 shipped with el7 breaks" >> $(METADATA)
|
||||||
|
@echo "Type: Regression" >> $(METADATA)
|
||||||
|
@echo "TestTime: 2m" >> $(METADATA)
|
||||||
|
@echo "RunFor: make" >> $(METADATA)
|
||||||
|
@echo "Requires: make coreutils sed diffutils" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: GPLv2+" >> $(METADATA)
|
||||||
|
@echo "Confidential: yes" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
@ -0,0 +1,3 @@
|
|||||||
|
PURPOSE of /tools/make/Regression/GNU-make-utility-v-3-82-shipped-with-el7-breaks
|
||||||
|
Author: Michal Kolar <mkolar@redhat.com>
|
||||||
|
Summary: GNU make utility v.3.82 shipped with el7 breaks environment vars
|
@ -0,0 +1,2 @@
|
|||||||
|
echo "TEST=false"
|
||||||
|
TEST=false
|
@ -0,0 +1,17 @@
|
|||||||
|
summary: GNU make utility v.3.82 shipped with el7 breaks
|
||||||
|
description: |
|
||||||
|
Summary: GNU make utility v.3.82 shipped with el7 breaks environment vars
|
||||||
|
contact:
|
||||||
|
- Michal Kolar <mkolar@redhat.com>
|
||||||
|
component:
|
||||||
|
- make
|
||||||
|
test: ./runtest.sh
|
||||||
|
framework: beakerlib
|
||||||
|
recommend:
|
||||||
|
- make
|
||||||
|
- coreutils
|
||||||
|
- sed
|
||||||
|
- diffutils
|
||||||
|
duration: 2m
|
||||||
|
extra-summary: /tools/make/Regression/GNU-make-utility-v-3-82-shipped-with-el7-breaks
|
||||||
|
extra-task: /tools/make/Regression/GNU-make-utility-v-3-82-shipped-with-el7-breaks
|
57
tests/GNU-make-utility-v-3-82-shipped-with-el7-breaks/runtest.sh
Executable file
57
tests/GNU-make-utility-v-3-82-shipped-with-el7-breaks/runtest.sh
Executable file
@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of /tools/make/Regression/GNU-make-utility-v-3-82-shipped-with-el7-breaks
|
||||||
|
# Description: Test for BZ#1323206 (GNU make utility v.3.82 shipped with el7 breaks)
|
||||||
|
# Author: Michal Kolar <mkolar@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Red Hat, 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 of
|
||||||
|
# the License, 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, see http://www.gnu.org/licenses/.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
CMD="make"
|
||||||
|
PACKAGE="make"
|
||||||
|
BIN="$(which $CMD)"
|
||||||
|
export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}"
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlShowRunningKernel
|
||||||
|
rlAssertRpm $PACKAGE
|
||||||
|
rlRun "TmpDir=\$(mktemp -d)"
|
||||||
|
rlRun "cp test.mk golden.output $TmpDir"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest
|
||||||
|
rlRun "make -f test.mk test TEST=false >stdout"
|
||||||
|
rlRun "sed -i -e '/Entering directory/d' -e '/Leaving directory/d' stdout"
|
||||||
|
rlRun "diff golden.output stdout"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
||||||
|
|
@ -0,0 +1,5 @@
|
|||||||
|
# User makefile
|
||||||
|
|
||||||
|
test: TEST ?= true
|
||||||
|
test:
|
||||||
|
echo "TEST=$(TEST)"
|
63
tests/Use-after-free-when-eval-in-variable/Makefile
Normal file
63
tests/Use-after-free-when-eval-in-variable/Makefile
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Makefile of /tools/make/Regression/Use-after-free-when-eval-in-variable
|
||||||
|
# Description: Test for Use-after-free() when eval in variable
|
||||||
|
# Author: Marek Polacek <polacek@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This copyrighted material is made available to anyone wishing
|
||||||
|
# to use, modify, copy, or redistribute it subject to the terms
|
||||||
|
# and conditions of the GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export TEST=/tools/make/Regression/Use-after-free-when-eval-in-variable
|
||||||
|
export TESTVERSION=1.0
|
||||||
|
|
||||||
|
BUILT_FILES=
|
||||||
|
|
||||||
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE test.mk
|
||||||
|
|
||||||
|
.PHONY: all install download clean
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./runtest.sh
|
||||||
|
|
||||||
|
build: $(BUILT_FILES)
|
||||||
|
test -x runtest.sh || chmod a+x runtest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ $(BUILT_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
include /usr/share/rhts/lib/rhts-make.include
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@echo "Owner: Marek Polacek <polacek@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: Test for Use-after-free() when eval in variable)" >> $(METADATA)
|
||||||
|
@echo "Type: Regression" >> $(METADATA)
|
||||||
|
@echo "TestTime: 2m" >> $(METADATA)
|
||||||
|
@echo "RunFor: make" >> $(METADATA)
|
||||||
|
@echo "Requires: make coreutils" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: GPLv2" >> $(METADATA)
|
||||||
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
3
tests/Use-after-free-when-eval-in-variable/PURPOSE
Normal file
3
tests/Use-after-free-when-eval-in-variable/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PURPOSE of /tools/make/Regression/Use-after-free-when-eval-in-variable
|
||||||
|
Author: Marek Polacek <polacek@redhat.com>
|
||||||
|
Summary: Use-after-free() when eval in variable assignments reassigns the same variable
|
15
tests/Use-after-free-when-eval-in-variable/main.fmf
Normal file
15
tests/Use-after-free-when-eval-in-variable/main.fmf
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
summary: Test for Use-after-free() when eval in variable)
|
||||||
|
description: |
|
||||||
|
Summary: Use-after-free() when eval in variable assignments reassigns the same variable
|
||||||
|
contact:
|
||||||
|
- Marek Polacek <polacek@redhat.com>
|
||||||
|
component:
|
||||||
|
- make
|
||||||
|
test: ./runtest.sh
|
||||||
|
framework: beakerlib
|
||||||
|
recommend:
|
||||||
|
- make
|
||||||
|
- coreutils
|
||||||
|
duration: 2m
|
||||||
|
extra-summary: /tools/make/Regression/Use-after-free-when-eval-in-variable
|
||||||
|
extra-task: /tools/make/Regression/Use-after-free-when-eval-in-variable
|
55
tests/Use-after-free-when-eval-in-variable/runtest.sh
Executable file
55
tests/Use-after-free-when-eval-in-variable/runtest.sh
Executable file
@ -0,0 +1,55 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of /tools/make/Regression/Use-after-free-when-eval-in-variable
|
||||||
|
# Description: Test for Use-after-free() when eval in variable
|
||||||
|
# Author: Marek Polacek <polacek@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This copyrighted material is made available to anyone wishing
|
||||||
|
# to use, modify, copy, or redistribute it subject to the terms
|
||||||
|
# and conditions of the GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
CMD="make"
|
||||||
|
BIN="$(which $CMD)"
|
||||||
|
PACKAGE="make"
|
||||||
|
export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}"
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlShowRunningKernel
|
||||||
|
rlAssertRpm $PACKAGE
|
||||||
|
rlRun "TmpDir=\$(mktemp -d)"
|
||||||
|
rlRun "cp test.mk $TmpDir"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest
|
||||||
|
rlRun "make -f test.mk"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
2
tests/Use-after-free-when-eval-in-variable/test.mk
Normal file
2
tests/Use-after-free-when-eval-in-variable/test.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
VARIABLE = $(eval VARIABLE := $(shell sleep 1; echo echo ahoj))$(VARIABLE)
|
||||||
|
wololo:; $(VARIABLE)
|
63
tests/make-3-79-has-a-parsing-bug/Makefile
Normal file
63
tests/make-3-79-has-a-parsing-bug/Makefile
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Makefile of /tools/make/Regression/make-3-79-has-a-parsing-bug
|
||||||
|
# Description: make 3.79 has a parsing bug
|
||||||
|
# Author: Michal Kolar <mkolar@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2017 Red Hat, 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 of
|
||||||
|
# the License, 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, see http://www.gnu.org/licenses/.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export TEST=/tools/make/Regression/make-3-79-has-a-parsing-bug
|
||||||
|
export TESTVERSION=1.0
|
||||||
|
|
||||||
|
BUILT_FILES=
|
||||||
|
|
||||||
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE test.mk
|
||||||
|
|
||||||
|
.PHONY: all install download clean
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./runtest.sh
|
||||||
|
|
||||||
|
build: $(BUILT_FILES)
|
||||||
|
test -x runtest.sh || chmod a+x runtest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ $(BUILT_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
include /usr/share/rhts/lib/rhts-make.include
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@echo "Owner: Michal Kolar <mkolar@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: make 3.79 has a parsing bug" >> $(METADATA)
|
||||||
|
@echo "Type: Regression" >> $(METADATA)
|
||||||
|
@echo "TestTime: 1m" >> $(METADATA)
|
||||||
|
@echo "RunFor: make" >> $(METADATA)
|
||||||
|
@echo "Requires: make coreutils" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: GPLv2+" >> $(METADATA)
|
||||||
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
3
tests/make-3-79-has-a-parsing-bug/PURPOSE
Normal file
3
tests/make-3-79-has-a-parsing-bug/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PURPOSE of /tools/make/Regression/make-3-79-has-a-parsing-bug
|
||||||
|
Description: make 3.79 has a parsing bug
|
||||||
|
Author: Michal Kolar <mkolar@redhat.com>
|
14
tests/make-3-79-has-a-parsing-bug/main.fmf
Normal file
14
tests/make-3-79-has-a-parsing-bug/main.fmf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
summary: make 3.79 has a parsing bug
|
||||||
|
description: ''
|
||||||
|
contact:
|
||||||
|
- Michal Kolar <mkolar@redhat.com>
|
||||||
|
component:
|
||||||
|
- make
|
||||||
|
test: ./runtest.sh
|
||||||
|
framework: beakerlib
|
||||||
|
recommend:
|
||||||
|
- make
|
||||||
|
- coreutils
|
||||||
|
duration: 1m
|
||||||
|
extra-summary: /tools/make/Regression/make-3-79-has-a-parsing-bug
|
||||||
|
extra-task: /tools/make/Regression/make-3-79-has-a-parsing-bug
|
55
tests/make-3-79-has-a-parsing-bug/runtest.sh
Executable file
55
tests/make-3-79-has-a-parsing-bug/runtest.sh
Executable file
@ -0,0 +1,55 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of /tools/make/Regression/make-3-79-has-a-parsing-bug
|
||||||
|
# Description: make 3.79 has a parsing bug
|
||||||
|
# Author: Michal Kolar <mkolar@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2017 Red Hat, 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 of
|
||||||
|
# the License, 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, see http://www.gnu.org/licenses/.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
CMD="make"
|
||||||
|
BIN="$(which $CMD)"
|
||||||
|
PACKAGE="make"
|
||||||
|
export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}"
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlShowRunningKernel
|
||||||
|
rlAssertRpm $PACKAGE
|
||||||
|
rlRun "TmpDir=\$(mktemp -d)"
|
||||||
|
rlRun "cp test.mk $TmpDir"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest
|
||||||
|
rlRun "touch file.l"
|
||||||
|
rlRun "make -f test.mk"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
13
tests/make-3-79-has-a-parsing-bug/test.mk
Normal file
13
tests/make-3-79-has-a-parsing-bug/test.mk
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Author: Petr Muller <pmuller@redhat.com>
|
||||||
|
|
||||||
|
default: out/file.o
|
||||||
|
%/.exists:
|
||||||
|
-mkdir $(@D)
|
||||||
|
touch $@
|
||||||
|
src/file.c: file.l src/.exists
|
||||||
|
@echo file.l to $@
|
||||||
|
touch $@
|
||||||
|
out/%.o: src/%.c out/.exists
|
||||||
|
@echo -c $< -o $@
|
||||||
|
touch $@
|
||||||
|
|
63
tests/order-only/Makefile
Normal file
63
tests/order-only/Makefile
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Makefile of /tools/make/Regression/order-only
|
||||||
|
# Description: Test for make bug
|
||||||
|
# Author: Petr Muller <pmuller@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2017 Red Hat, 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 3 of
|
||||||
|
# the License, 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, see http://www.gnu.org/licenses/.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export TEST=/tools/make/Regression/order-only
|
||||||
|
export TESTVERSION=1.0
|
||||||
|
|
||||||
|
BUILT_FILES=
|
||||||
|
|
||||||
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE test.mk golden.output
|
||||||
|
|
||||||
|
.PHONY: all install download clean
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./runtest.sh
|
||||||
|
|
||||||
|
build: $(BUILT_FILES)
|
||||||
|
test -x runtest.sh || chmod a+x runtest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ $(BUILT_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
include /usr/share/rhts/lib/rhts-make.include
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@echo "Owner: Petr Muller <pmuller@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: Test for make bug" >> $(METADATA)
|
||||||
|
@echo "Type: Regression" >> $(METADATA)
|
||||||
|
@echo "TestTime: 1m" >> $(METADATA)
|
||||||
|
@echo "RunFor: make" >> $(METADATA)
|
||||||
|
@echo "Requires: make coreutils diffutils" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: GPLv3" >> $(METADATA)
|
||||||
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
4
tests/order-only/PURPOSE
Normal file
4
tests/order-only/PURPOSE
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
PURPOSE of /tools/make/Regression/order-only
|
||||||
|
Description: Regression Test for make bug
|
||||||
|
Author: Petr Muller <pmuller@redhat.com>
|
||||||
|
Summary: Test that make doesn't insert bogus values into order-only dependencies
|
9
tests/order-only/golden.output
Normal file
9
tests/order-only/golden.output
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
mkdir -p dir/b/.
|
||||||
|
@ [a/b/c]
|
||||||
|
^ []
|
||||||
|
? []
|
||||||
|
mkdir -p a/b/.
|
||||||
|
@ [a]
|
||||||
|
^ []
|
||||||
|
? []
|
||||||
|
rm dir/b/.
|
16
tests/order-only/main.fmf
Normal file
16
tests/order-only/main.fmf
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
summary: Test for make bug
|
||||||
|
description: |
|
||||||
|
Summary: Test that make doesn't insert bogus values into order-only dependencies
|
||||||
|
contact:
|
||||||
|
- Petr Muller <pmuller@redhat.com>
|
||||||
|
component:
|
||||||
|
- make
|
||||||
|
test: ./runtest.sh
|
||||||
|
framework: beakerlib
|
||||||
|
recommend:
|
||||||
|
- make
|
||||||
|
- coreutils
|
||||||
|
- diffutils
|
||||||
|
duration: 1m
|
||||||
|
extra-summary: /tools/make/Regression/order-only
|
||||||
|
extra-task: /tools/make/Regression/order-only
|
55
tests/order-only/runtest.sh
Executable file
55
tests/order-only/runtest.sh
Executable file
@ -0,0 +1,55 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of /tools/make/Regression/order-only
|
||||||
|
# Description: Test for make bug
|
||||||
|
# Author: Petr Muller <pmuller@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2017 Red Hat, 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 3 of
|
||||||
|
# the License, 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, see http://www.gnu.org/licenses/.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
CMD="make"
|
||||||
|
BIN="$(which $CMD)"
|
||||||
|
PACKAGE="make"
|
||||||
|
export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}"
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlShowRunningKernel
|
||||||
|
rlAssertRpm $PACKAGE
|
||||||
|
rlRun "TmpDir=\$(mktemp -d)"
|
||||||
|
rlRun "cp test.mk golden.output $TmpDir"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest
|
||||||
|
rlRun "make -f test.mk | grep -v -e 'Entering' -e 'Leaving' >tested.output"
|
||||||
|
rlRun "diff golden.output tested.output"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
17
tests/order-only/test.mk
Normal file
17
tests/order-only/test.mk
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
all: ./a/b/c a
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf a dir
|
||||||
|
|
||||||
|
%/.:
|
||||||
|
mkdir -p $(@)
|
||||||
|
|
||||||
|
a/%/c: | ./dir/%/.
|
||||||
|
@echo "@ [$@]"
|
||||||
|
@echo "^ [$^]"
|
||||||
|
@echo "? [$?]"
|
||||||
|
|
||||||
|
a: | ./a/b/.
|
||||||
|
@echo "@ [$@]"
|
||||||
|
@echo "^ [$^]"
|
||||||
|
@echo "? [$?]"
|
63
tests/smoke-check-make-runs/Makefile
Normal file
63
tests/smoke-check-make-runs/Makefile
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Makefile of /tools/make/Sanity/smoke-check-make-runs
|
||||||
|
# Description: Show your version. Build a one-file project.
|
||||||
|
# Author: Vaclav Kadlcik <vkadlcik@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2015 Red Hat, 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 of
|
||||||
|
# the License, 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, see http://www.gnu.org/licenses/.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export TEST=/tools/make/Sanity/smoke-check-make-runs
|
||||||
|
export TESTVERSION=1.0
|
||||||
|
|
||||||
|
BUILT_FILES=
|
||||||
|
|
||||||
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE hello_world.c smoke.mk
|
||||||
|
|
||||||
|
.PHONY: all install download clean
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./runtest.sh
|
||||||
|
|
||||||
|
build: $(BUILT_FILES)
|
||||||
|
test -x runtest.sh || chmod a+x runtest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ $(BUILT_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
include /usr/share/rhts/lib/rhts-make.include
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@echo "Owner: Vaclav Kadlcik <vkadlcik@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: Show your version. Build a one-file project." >> $(METADATA)
|
||||||
|
@echo "Type: Sanity" >> $(METADATA)
|
||||||
|
@echo "TestTime: 5m" >> $(METADATA)
|
||||||
|
@echo "RunFor: make" >> $(METADATA)
|
||||||
|
@echo "Requires: make gcc" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: GPLv2+" >> $(METADATA)
|
||||||
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
3
tests/smoke-check-make-runs/PURPOSE
Normal file
3
tests/smoke-check-make-runs/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PURPOSE of /tools/make/Sanity/smoke-check-make-runs
|
||||||
|
Description: Show your version. Build a one-file project.
|
||||||
|
Author: Vaclav Kadlcik <vkadlcik@redhat.com>
|
8
tests/smoke-check-make-runs/hello_world.c
Normal file
8
tests/smoke-check-make-runs/hello_world.c
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(int argc, char ** argv) {
|
||||||
|
if (printf("Hello world!\n") < 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
14
tests/smoke-check-make-runs/main.fmf
Normal file
14
tests/smoke-check-make-runs/main.fmf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
summary: Show your version. Build a one-file project.
|
||||||
|
description: ''
|
||||||
|
contact:
|
||||||
|
- Vaclav Kadlcik <vkadlcik@redhat.com>
|
||||||
|
component:
|
||||||
|
- make
|
||||||
|
test: ./runtest.sh
|
||||||
|
framework: beakerlib
|
||||||
|
recommend:
|
||||||
|
- make
|
||||||
|
- gcc
|
||||||
|
duration: 5m
|
||||||
|
extra-summary: /tools/make/Sanity/smoke-check-make-runs
|
||||||
|
extra-task: /tools/make/Sanity/smoke-check-make-runs
|
61
tests/smoke-check-make-runs/runtest.sh
Executable file
61
tests/smoke-check-make-runs/runtest.sh
Executable file
@ -0,0 +1,61 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of /tools/make/Sanity/smoke-check-make-runs
|
||||||
|
# Description: Show your version. Build a one-file project.
|
||||||
|
# Author: Vaclav Kadlcik <vkadlcik@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2015 Red Hat, 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 of
|
||||||
|
# the License, 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, see http://www.gnu.org/licenses/.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
MAKE="$(which --skip-alias make)"
|
||||||
|
PACKAGE="make"
|
||||||
|
export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $MAKE)}"
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlAssertRpm $PACKAGE
|
||||||
|
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||||
|
rlRun "cp hello_world.c $TmpDir"
|
||||||
|
rlRun "cp smoke.mk $TmpDir/Makefile"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest
|
||||||
|
rlRun -t -s 'make -v'
|
||||||
|
rlAssertNotGrep '^STDERR:' $rlRun_LOG
|
||||||
|
rlAssertGrep '^STDOUT: GNU Make [0-9]' $rlRun_LOG
|
||||||
|
rlAssertNotExists 'hello_world'
|
||||||
|
rlRun 'make'
|
||||||
|
rlAssertExists 'hello_world'
|
||||||
|
rlRun './hello_world'
|
||||||
|
rlRun 'make clean'
|
||||||
|
rlAssertNotExists 'hello_world'
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
9
tests/smoke-check-make-runs/smoke.mk
Normal file
9
tests/smoke-check-make-runs/smoke.mk
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
all: hello_world
|
||||||
|
|
||||||
|
hello_world: hello_world.o
|
||||||
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f hello_world hello_world.o
|
||||||
|
|
||||||
|
.SUFFIXES: .c
|
Loading…
Reference in New Issue
Block a user