import popt-1.16-14.el8
This commit is contained in:
commit
b1f1c29859
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
SOURCES/popt-1.16.tar.gz
|
1
.popt.metadata
Normal file
1
.popt.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
cfe94a15a2404db85858a81ff8de27c8ff3e235e SOURCES/popt-1.16.tar.gz
|
71
SOURCES/popt-1.16-execfail.patch
Normal file
71
SOURCES/popt-1.16-execfail.patch
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
Patch by Panu Matilainen <pmatilai@redhat.com> for popt <= 1.16 which kludges
|
||||||
|
poptBadOption() to return something semi-meaningful on exec alias fail:
|
||||||
|
|
||||||
|
- poptBadOption() is totally unaware of exec alias failures, and will return
|
||||||
|
either the first argument or last option, giving wonderfully misleading error
|
||||||
|
messages (#697435, #710267).
|
||||||
|
- Remember execvp() first argument on failure and return that from
|
||||||
|
poptBadOption() if present to give the user a reasonable clue what exactly
|
||||||
|
went wrong.
|
||||||
|
|
||||||
|
This patch was proposed to upstream: http://rpm5.org/community/popt-devel/0264.html
|
||||||
|
|
||||||
|
--- popt-1.16/popt.c 2010-01-19 01:39:10.000000000 +0100
|
||||||
|
+++ popt-1.16/popt.c.execfail 2013-11-24 15:50:06.000000000 +0100
|
||||||
|
@@ -192,6 +192,7 @@
|
||||||
|
con->flags = flags;
|
||||||
|
con->execs = NULL;
|
||||||
|
con->numExecs = 0;
|
||||||
|
+ con->execFail = NULL;
|
||||||
|
con->finalArgvAlloced = argc * 2;
|
||||||
|
con->finalArgv = calloc( (size_t)con->finalArgvAlloced, sizeof(*con->finalArgv) );
|
||||||
|
con->execAbsolute = 1;
|
||||||
|
@@ -236,6 +237,7 @@
|
||||||
|
con->nextLeftover = 0;
|
||||||
|
con->restLeftover = 0;
|
||||||
|
con->doExec = NULL;
|
||||||
|
+ con->execFail = _free(con->execFail);
|
||||||
|
|
||||||
|
if (con->finalArgv != NULL)
|
||||||
|
for (i = 0; i < con->finalArgvCount; i++) {
|
||||||
|
@@ -564,6 +566,7 @@
|
||||||
|
/*@-nullstate@*/
|
||||||
|
rc = execvp(argv[0], (char *const *)argv);
|
||||||
|
/*@=nullstate@*/
|
||||||
|
+ con->execFail = xstrdup(argv[0]);
|
||||||
|
|
||||||
|
exit:
|
||||||
|
if (argv) {
|
||||||
|
@@ -1697,11 +1700,19 @@
|
||||||
|
const char * poptBadOption(poptContext con, unsigned int flags)
|
||||||
|
{
|
||||||
|
struct optionStackEntry * os = NULL;
|
||||||
|
+ const char *badOpt = NULL;
|
||||||
|
|
||||||
|
- if (con != NULL)
|
||||||
|
- os = (flags & POPT_BADOPTION_NOALIAS) ? con->optionStack : con->os;
|
||||||
|
+ if (con != NULL) {
|
||||||
|
+ /* Stupid hack to return something semi-meaningful from exec failure */
|
||||||
|
+ if (con->execFail) {
|
||||||
|
+ badOpt = con->execFail;
|
||||||
|
+ } else {
|
||||||
|
+ os = (flags & POPT_BADOPTION_NOALIAS) ? con->optionStack : con->os;
|
||||||
|
+ badOpt = os->argv[os->next - 1];
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- return (os != NULL && os->argv != NULL ? os->argv[os->next - 1] : NULL);
|
||||||
|
+ return badOpt;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char * poptStrerror(const int error)
|
||||||
|
--- popt-1.16/poptint.h 2010-01-19 01:39:10.000000000 +0100
|
||||||
|
+++ popt-1.16/poptint.h.execfail 2013-11-24 15:50:38.000000000 +0100
|
||||||
|
@@ -132,6 +132,7 @@
|
||||||
|
/*@owned@*/ /*@null@*/
|
||||||
|
poptItem execs;
|
||||||
|
int numExecs;
|
||||||
|
+ char * execFail;
|
||||||
|
/*@only@*/ /*@null@*/
|
||||||
|
poptArgv finalArgv;
|
||||||
|
int finalArgvCount;
|
24
SOURCES/popt-1.16-glob-error.patch
Normal file
24
SOURCES/popt-1.16-glob-error.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
Backport of upstream http://rpm5.org/cvs/chngview?cn=19258
|
||||||
|
|
||||||
|
--- popt-1.16/poptconfig.c 2009-05-20 15:18:07.000000000 +0200
|
||||||
|
+++ popt-1.16/poptconfig.c.glob-error 2017-10-12 23:33:28.868435647 +0200
|
||||||
|
@@ -108,7 +108,7 @@
|
||||||
|
if (glob_pattern_p(pat, 0)) {
|
||||||
|
glob_t _g, *pglob = &_g;
|
||||||
|
|
||||||
|
- if (!glob(pat, poptGlobFlags, poptGlob_error, pglob)) {
|
||||||
|
+ if (!(rc = glob(pat, poptGlobFlags, poptGlob_error, pglob))) {
|
||||||
|
if (acp) {
|
||||||
|
*acp = (int) pglob->gl_pathc;
|
||||||
|
pglob->gl_pathc = 0;
|
||||||
|
@@ -122,6 +122,10 @@
|
||||||
|
/*@-nullstate@*/
|
||||||
|
globfree(pglob);
|
||||||
|
/*@=nullstate@*/
|
||||||
|
+ } else if (rc == GLOB_NOMATCH) {
|
||||||
|
+ *avp = NULL;
|
||||||
|
+ *acp = 0;
|
||||||
|
+ rc = 0;
|
||||||
|
} else
|
||||||
|
rc = POPT_ERROR_ERRNO;
|
||||||
|
} else
|
107
SOURCES/popt-1.16-help.patch
Normal file
107
SOURCES/popt-1.16-help.patch
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
Patch initially by Miloslav Trmač <mitr@redhat.com> and revised by Akira Tagoh
|
||||||
|
<tagoh@redhat.com> for popt <= 1.16 which fixes the problem that help messages
|
||||||
|
for --help and --usage seem not translatable. There already was some i18n support
|
||||||
|
for autohelp in popt.c, but not in popthelp.c, where it actually matters.
|
||||||
|
|
||||||
|
See https://bugzilla.redhat.com/show_bug.cgi?id=734434 for further details, please.
|
||||||
|
|
||||||
|
This patch was proposed to upstream: http://rpm5.org/community/popt-devel/0287.html
|
||||||
|
|
||||||
|
--- popt-1.16/popthelp.c 2009-08-28 09:06:33.000000000 +0900
|
||||||
|
+++ popt-1.16/popthelp.c.help 2014-01-08 12:04:00.888260244 +0900
|
||||||
|
@@ -89,7 +89,7 @@ static struct poptOption poptHelpOptions
|
||||||
|
{ "defaults", '\0', POPT_ARG_NONE, &show_option_defaults, 0,
|
||||||
|
N_("Display option defaults in message"), NULL },
|
||||||
|
#endif
|
||||||
|
- { "", '\0', 0, NULL, 0, N_("Terminate options"), NULL },
|
||||||
|
+ { NULL, '\0', 0, NULL, 0, N_("Terminate options"), NULL },
|
||||||
|
POPT_TABLEEND
|
||||||
|
} ;
|
||||||
|
|
||||||
|
@@ -527,8 +527,11 @@ static size_t maxArgWidth(const struct p
|
||||||
|
if (opt != NULL)
|
||||||
|
while (opt->longName || opt->shortName || opt->arg) {
|
||||||
|
if (poptArgType(opt) == POPT_ARG_INCLUDE_TABLE) {
|
||||||
|
- if (opt->arg) /* XXX program error */
|
||||||
|
- len = maxArgWidth(opt->arg, translation_domain);
|
||||||
|
+ void * arg = opt->arg;
|
||||||
|
+ /* XXX sick hack to preserve pretense of ABI. */
|
||||||
|
+ if (arg == poptHelpOptions) arg = poptHelpOptionsI18N;
|
||||||
|
+ if (arg) /* XXX program error */
|
||||||
|
+ len = maxArgWidth(arg, translation_domain);
|
||||||
|
if (len > max) max = len;
|
||||||
|
} else if (!F_ISSET(opt, DOC_HIDDEN)) {
|
||||||
|
len = sizeof(" ")-1;
|
||||||
|
@@ -619,19 +622,22 @@ static void singleTableHelp(poptContext
|
||||||
|
|
||||||
|
if (table != NULL)
|
||||||
|
for (opt = table; opt->longName || opt->shortName || opt->arg; opt++) {
|
||||||
|
+ void * arg = opt->arg;
|
||||||
|
if (poptArgType(opt) != POPT_ARG_INCLUDE_TABLE)
|
||||||
|
continue;
|
||||||
|
- sub_transdom = getTableTranslationDomain(opt->arg);
|
||||||
|
+ /* XXX sick hack to preserve pretense of ABI. */
|
||||||
|
+ if (arg == poptHelpOptions) arg = poptHelpOptionsI18N;
|
||||||
|
+ sub_transdom = getTableTranslationDomain(arg);
|
||||||
|
if (sub_transdom == NULL)
|
||||||
|
sub_transdom = translation_domain;
|
||||||
|
|
||||||
|
/* If no popt aliases/execs, skip poptAliasOption processing. */
|
||||||
|
- if (opt->arg == poptAliasOptions && !(con->numAliases || con->numExecs))
|
||||||
|
+ if (arg == poptAliasOptions && !(con->numAliases || con->numExecs))
|
||||||
|
continue;
|
||||||
|
if (opt->descrip)
|
||||||
|
xx = POPT_fprintf(fp, "\n%s\n", D_(sub_transdom, opt->descrip));
|
||||||
|
|
||||||
|
- singleTableHelp(con, fp, opt->arg, columns, sub_transdom);
|
||||||
|
+ singleTableHelp(con, fp, arg, columns, sub_transdom);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -808,22 +814,25 @@ static size_t singleTableUsage(poptConte
|
||||||
|
translation_domain = (const char *)opt->arg;
|
||||||
|
} else
|
||||||
|
if (poptArgType(opt) == POPT_ARG_INCLUDE_TABLE) {
|
||||||
|
+ void * arg = opt->arg;
|
||||||
|
+ /* XXX sick hack to preserve pretense of ABI. */
|
||||||
|
+ if (arg == poptHelpOptions) arg = poptHelpOptionsI18N;
|
||||||
|
if (done) {
|
||||||
|
int i = 0;
|
||||||
|
if (done->opts != NULL)
|
||||||
|
for (i = 0; i < done->nopts; i++) {
|
||||||
|
const void * that = done->opts[i];
|
||||||
|
- if (that == NULL || that != opt->arg)
|
||||||
|
+ if (that == NULL || that != arg)
|
||||||
|
/*@innercontinue@*/ continue;
|
||||||
|
/*@innerbreak@*/ break;
|
||||||
|
}
|
||||||
|
/* Skip if this table has already been processed. */
|
||||||
|
- if (opt->arg == NULL || i < done->nopts)
|
||||||
|
+ if (arg == NULL || i < done->nopts)
|
||||||
|
continue;
|
||||||
|
if (done->opts != NULL && done->nopts < done->maxopts)
|
||||||
|
- done->opts[done->nopts++] = (const void *) opt->arg;
|
||||||
|
+ done->opts[done->nopts++] = (const void *) arg;
|
||||||
|
}
|
||||||
|
- columns->cur = singleTableUsage(con, fp, columns, opt->arg,
|
||||||
|
+ columns->cur = singleTableUsage(con, fp, columns, arg,
|
||||||
|
translation_domain, done);
|
||||||
|
} else
|
||||||
|
if ((opt->longName || opt->shortName) && !F_ISSET(opt, DOC_HIDDEN)) {
|
||||||
|
@@ -864,9 +873,13 @@ static size_t showShortOptions(const str
|
||||||
|
if (!strchr(s, opt->shortName) && isprint((int)opt->shortName)
|
||||||
|
&& opt->shortName != ' ')
|
||||||
|
s[strlen(s)] = opt->shortName;
|
||||||
|
- } else if (poptArgType(opt) == POPT_ARG_INCLUDE_TABLE)
|
||||||
|
- if (opt->arg) /* XXX program error */
|
||||||
|
- len = showShortOptions(opt->arg, fp, s);
|
||||||
|
+ } else if (poptArgType(opt) == POPT_ARG_INCLUDE_TABLE) {
|
||||||
|
+ void * arg = opt->arg;
|
||||||
|
+ /* XXX sick hack to preserve pretense of ABI. */
|
||||||
|
+ if (arg == poptHelpOptions) arg = poptHelpOptionsI18N;
|
||||||
|
+ if (arg) /* XXX program error */
|
||||||
|
+ len = showShortOptions(arg, fp, s);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* On return to top level, print the short options, return print length. */
|
66
SOURCES/popt-1.16-man-page.patch
Normal file
66
SOURCES/popt-1.16-man-page.patch
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
Patch by John Bradshaw <john@johnbradshaw.org> for popt <= 1.16 which fixes some
|
||||||
|
spelling mistakes in popt man page.
|
||||||
|
|
||||||
|
See https://bugzilla.redhat.com/show_bug.cgi?id=675567 for further details, please.
|
||||||
|
This patch was proposed to upstream: http://rpm5.org/community/popt-devel/0263.html
|
||||||
|
|
||||||
|
Upstream already corrected some issues with http://rpm5.org/cvs/chngview?cn=16879
|
||||||
|
and solved the last ones with http://rpm5.org/cvs/chngview?cn=17375 now. Thus popt
|
||||||
|
1.17 should make this patch completely obsolete.
|
||||||
|
|
||||||
|
--- popt-1.16/popt.3 2009-07-25 20:52:36.000000000 +0200
|
||||||
|
+++ popt-1.16/popt.3.man-page 2013-11-24 15:59:58.000000000 +0100
|
||||||
|
@@ -200,7 +200,7 @@
|
||||||
|
.RB "This macro includes another option table (via " POPT_ARG_INCLUDE_TABLE
|
||||||
|
; see below) in the main one which provides the table entries for these
|
||||||
|
.RB "arguments. When " --usage " or " --help " are passed to programs which
|
||||||
|
-use popt's automatical help, popt displays the appropriate message on
|
||||||
|
+use popt's automatic help, popt displays the appropriate message on
|
||||||
|
stderr as soon as it finds the option, and exits the program with a
|
||||||
|
return code of 0. If you want to use popt's automatic help generation in
|
||||||
|
a different way, you need to explicitly add the option entries to your programs
|
||||||
|
@@ -210,7 +210,7 @@
|
||||||
|
the argument will not be shown in help output.
|
||||||
|
.sp
|
||||||
|
If the \fIargInfo\fR value is bitwise or'd with \fBPOPT_ARGFLAG_SHOW_DEFAULT\fR,
|
||||||
|
-the inital value of the arg will be shown in help output.
|
||||||
|
+the initial value of the arg will be shown in help output.
|
||||||
|
.sp
|
||||||
|
The final structure in the table should have all the pointer values set
|
||||||
|
.RB "to " NULL " and all the arithmetic values set to 0, marking the "
|
||||||
|
@@ -233,7 +233,7 @@
|
||||||
|
contain a overall description of the option table being included.
|
||||||
|
.sp
|
||||||
|
The other special option table entry type tells popt to call a function (a
|
||||||
|
-callback) when any option in that table is found. This is especially usefull
|
||||||
|
+callback) when any option in that table is found. This is especially useful
|
||||||
|
when included option tables are being used, as the program which provides
|
||||||
|
the top-level option table doesn't need to be aware of the other options
|
||||||
|
which are provided by the included table. When a callback is set for
|
||||||
|
@@ -473,7 +473,7 @@
|
||||||
|
.TP
|
||||||
|
.B POPT_ERROR_BADNUMBER
|
||||||
|
A conversion from a string to a number (int or long) failed due
|
||||||
|
-to the string containing nonnumeric characters. This occurs when
|
||||||
|
+to the string containing non-numeric characters. This occurs when
|
||||||
|
.BR poptGetNextOpt() " is processing an argument of type "
|
||||||
|
.BR POPT_ARG_INT ", " POPT_ARG_SHORT ", " POPT_ARG_LONG ", " POPT_ARG_LONGLONG ", "
|
||||||
|
.RB POPT_ARG_FLOAT ", or " POPT_ARG_DOUBLE "."
|
||||||
|
@@ -517,7 +517,7 @@
|
||||||
|
applications. When an error is detected from most of the functions,
|
||||||
|
an error message is printed along with the error string from
|
||||||
|
.BR poptStrerror() ". When an error occurs during argument parsing, "
|
||||||
|
-code similiar to the following displays a useful error message:
|
||||||
|
+code similar to the following displays a useful error message:
|
||||||
|
.sp
|
||||||
|
.nf
|
||||||
|
fprintf(stderr, "%s: %s\\n",
|
||||||
|
@@ -608,7 +608,7 @@
|
||||||
|
.RI "an " argv "-style array, some programs need to parse strings that "
|
||||||
|
are formatted identically to command lines. To facilitate this, popt
|
||||||
|
provides a function that parses a string into an array of strings,
|
||||||
|
-using rules similiar to normal shell parsing.
|
||||||
|
+using rules similar to normal shell parsing.
|
||||||
|
.sp
|
||||||
|
.nf
|
||||||
|
.B "#include <popt.h>"
|
79
SOURCES/popt-1.16-nextarg-memleak.patch
Normal file
79
SOURCES/popt-1.16-nextarg-memleak.patch
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
From 6fcb24d785a2c2d626bac6999aee6b3ab368be15 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Jones <pjones@redhat.com>
|
||||||
|
Date: Fri, 28 Jul 2017 16:11:40 -0400
|
||||||
|
Subject: [PATCH] Don't leak the last argument expanded by expandNextArg()
|
||||||
|
|
||||||
|
While using POPT_ARG_ARGV, I noticed this in valgrind's leak checker:
|
||||||
|
|
||||||
|
==1738== HEAP SUMMARY:
|
||||||
|
==1738== in use at exit: 8 bytes in 1 blocks
|
||||||
|
==1738== total heap usage: 94 allocs, 93 frees, 42,319 bytes allocated
|
||||||
|
==1738==
|
||||||
|
==1738== 8 bytes in 1 blocks are definitely lost in loss record 1 of 1
|
||||||
|
==1738== at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
|
||||||
|
==1738== by 0x4E3DF47: expandNextArg (popt.c:699)
|
||||||
|
==1738== by 0x4E3F681: poptGetNextOpt (popt.c:1501)
|
||||||
|
==1738== by 0x401F72: main (bingrep.c:433)
|
||||||
|
==1738==
|
||||||
|
==1738== LEAK SUMMARY:
|
||||||
|
==1738== definitely lost: 8 bytes in 1 blocks
|
||||||
|
==1738== indirectly lost: 0 bytes in 0 blocks
|
||||||
|
==1738== possibly lost: 0 bytes in 0 blocks
|
||||||
|
==1738== still reachable: 0 bytes in 0 blocks
|
||||||
|
==1738== suppressed: 0 bytes in 0 blocks
|
||||||
|
|
||||||
|
My command line argument is a 7-byte string, and on first glance, it
|
||||||
|
appears this is because both expandNextArg() and poptSaveString()
|
||||||
|
duplicate the string. The copy from poptSaveString() is the consuming
|
||||||
|
program's responsibility to free, but the intermediate pointer is popt's
|
||||||
|
responsibility.
|
||||||
|
|
||||||
|
Upon further examination, it appears popt normally does free this
|
||||||
|
string, but it only does it on the next entry to poptGetNextOpt(), and
|
||||||
|
on cleanOSE() in the case if we're not already at the bottom of
|
||||||
|
con->OptionStack.
|
||||||
|
|
||||||
|
This patch modifies poptResetContext() to ensure we'll always attempt to
|
||||||
|
free con->os->nextArg regardless of our position in the OptionStack, and
|
||||||
|
removes the duplicate free of con->os->argb in poptFreeContext(), as
|
||||||
|
it's called unconditionally by the poptResetContext() call on the
|
||||||
|
previous line.
|
||||||
|
|
||||||
|
This ensures that if poptGetNextOpt() isn't re-intered, poptFreeContext()
|
||||||
|
will free the memory that was allocated. Now valgrind tells me:
|
||||||
|
|
||||||
|
==31734== HEAP SUMMARY:
|
||||||
|
==31734== in use at exit: 0 bytes in 0 blocks
|
||||||
|
==31734== total heap usage: 94 allocs, 94 frees, 42,319 bytes allocated
|
||||||
|
==31734==
|
||||||
|
==31734== All heap blocks were freed -- no leaks are possible
|
||||||
|
|
||||||
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||||
|
---
|
||||||
|
popt.c | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/popt.c b/popt.c
|
||||||
|
index 1a53f40..72fbf5c 100644
|
||||||
|
--- a/popt.c
|
||||||
|
+++ b/popt.c
|
||||||
|
@@ -230,7 +230,7 @@ void poptResetContext(poptContext con)
|
||||||
|
con->os->argb = PBM_FREE(con->os->argb);
|
||||||
|
con->os->currAlias = NULL;
|
||||||
|
con->os->nextCharArg = NULL;
|
||||||
|
- con->os->nextArg = NULL;
|
||||||
|
+ con->os->nextArg = _free(con->os->nextArg);
|
||||||
|
con->os->next = 1; /* skip argv[0] */
|
||||||
|
|
||||||
|
con->numLeftovers = 0;
|
||||||
|
@@ -1617,7 +1617,6 @@ poptContext poptFreeContext(poptContext con)
|
||||||
|
{
|
||||||
|
if (con == NULL) return con;
|
||||||
|
poptResetContext(con);
|
||||||
|
- con->os->argb = _free(con->os->argb);
|
||||||
|
|
||||||
|
con->aliases = poptFreeItems(con->aliases, con->numAliases);
|
||||||
|
con->numAliases = 0;
|
||||||
|
--
|
||||||
|
2.13.3
|
||||||
|
|
31
SOURCES/popt-1.16-pkgconfig.patch
Normal file
31
SOURCES/popt-1.16-pkgconfig.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
Patch by Robert Scheck <robert@fedoraproject.org> for popt <= 1.16 which changes
|
||||||
|
$(pkgconfigdir) on 64 bit systems from /usr/lib/pkgconfig to /usr/lib64/pkgconfig.
|
||||||
|
Using $(libdir)/pkgconfig rather $(prefix)/lib/pkgconfig seems to be common when
|
||||||
|
searching on the Internet. This patch however is not really compliant with Fedora
|
||||||
|
/%{_lib} vs. %{_libdir} handling before the UsrMove with Fedora 17. Alternatively
|
||||||
|
--with-pkgconfigdir or similar should be implemented.
|
||||||
|
|
||||||
|
This patch was proposed to upstream: http://rpm5.org/community/popt-devel/0265.html
|
||||||
|
|
||||||
|
--- popt-1.16/Makefile.in 2010-05-04 22:55:59.000000000 +0200
|
||||||
|
+++ popt-1.16/Makefile.in.pkgconfig 2013-11-24 15:06:43.000000000 +0100
|
||||||
|
@@ -370,7 +370,7 @@
|
||||||
|
libpopt_la_SOURCES = popt.c poptparse.c poptconfig.c popthelp.c poptint.c
|
||||||
|
libpopt_la_LDFLAGS = -no-undefined @LTLIBINTL@ @LTLIBICONV@ \
|
||||||
|
$(am__append_1)
|
||||||
|
-pkgconfigdir = $(prefix)/lib/pkgconfig
|
||||||
|
+pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = popt.pc
|
||||||
|
man_MANS = popt.3
|
||||||
|
BUILT_SOURCES = popt.pc # popt.lcd
|
||||||
|
--- popt-1.16/Makefile.am 2010-05-04 22:55:54.000000000 +0200
|
||||||
|
+++ popt-1.16/Makefile.am.pkgconfig 2013-11-24 15:02:21.000000000 +0100
|
||||||
|
@@ -47,7 +47,7 @@
|
||||||
|
libpopt_la_SOURCES = popt.c poptparse.c poptconfig.c popthelp.c poptint.c
|
||||||
|
libpopt_la_LDFLAGS = -no-undefined @LTLIBINTL@ @LTLIBICONV@
|
||||||
|
|
||||||
|
-pkgconfigdir = $(prefix)/lib/pkgconfig
|
||||||
|
+pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = popt.pc
|
||||||
|
|
||||||
|
if HAVE_LD_VERSION_SCRIPT
|
231
SPECS/popt.spec
Normal file
231
SPECS/popt.spec
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
Summary: C library for parsing command line parameters
|
||||||
|
Name: popt
|
||||||
|
Version: 1.16
|
||||||
|
Release: 14%{?dist}
|
||||||
|
License: MIT
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
URL: http://www.rpm5.org/
|
||||||
|
Source: http://www.rpm5.org/files/%{name}/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: popt-1.16-pkgconfig.patch
|
||||||
|
Patch1: popt-1.16-execfail.patch
|
||||||
|
Patch2: popt-1.16-man-page.patch
|
||||||
|
Patch3: popt-1.16-help.patch
|
||||||
|
Patch4: popt-1.16-nextarg-memleak.patch
|
||||||
|
Patch5: popt-1.16-glob-error.patch
|
||||||
|
BuildRequires: gcc gettext
|
||||||
|
|
||||||
|
%description
|
||||||
|
Popt is a C library for parsing command line parameters. Popt was
|
||||||
|
heavily influenced by the getopt() and getopt_long() functions, but
|
||||||
|
it improves on them by allowing more powerful argument expansion.
|
||||||
|
Popt can parse arbitrary argv[] style arrays and automatically set
|
||||||
|
variables based on command line arguments. Popt allows command line
|
||||||
|
arguments to be aliased via configuration files and includes utility
|
||||||
|
functions for parsing arbitrary strings into argv[] arrays using
|
||||||
|
shell-like rules.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for the popt library
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}, pkgconfig
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The popt-devel package includes header files and libraries necessary
|
||||||
|
for developing programs which use the popt C library. It contains the
|
||||||
|
API documentation of the popt library, too.
|
||||||
|
|
||||||
|
%package static
|
||||||
|
Summary: Static library for parsing command line parameters
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description static
|
||||||
|
The popt-static package includes static libraries of the popt library.
|
||||||
|
Install it if you need to link statically with libpopt.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch0 -p1 -b .pkgconfig
|
||||||
|
%patch1 -p1 -b .execfail
|
||||||
|
%patch2 -p1 -b .man-page
|
||||||
|
%patch3 -p1 -b .help
|
||||||
|
%patch4 -p1 -b .nextarg-memleak
|
||||||
|
%patch5 -p1 -b .glob-error
|
||||||
|
|
||||||
|
%build
|
||||||
|
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
||||||
|
%configure --libdir=/%{_lib}
|
||||||
|
%else
|
||||||
|
%configure
|
||||||
|
%endif
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
|
||||||
|
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
||||||
|
# Move libpopt.{so,a} to %{_libdir}
|
||||||
|
rm -f $RPM_BUILD_ROOT/%{_lib}/libpopt.{la,so}
|
||||||
|
pushd $RPM_BUILD_ROOT/%{_lib}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
||||||
|
ln -sf ../../%{_lib}/$(ls libpopt.so.?.?.?) $RPM_BUILD_ROOT%{_libdir}/libpopt.so
|
||||||
|
popd
|
||||||
|
mv -f $RPM_BUILD_ROOT/%{_lib}/libpopt.a $RPM_BUILD_ROOT%{_libdir}/libpopt.a
|
||||||
|
mv -f $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT%{_libdir}/pkgconfig
|
||||||
|
%else
|
||||||
|
rm -f $RPM_BUILD_ROOT/%{_libdir}/libpopt.la
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Multiple popt configurations are possible
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/popt.d
|
||||||
|
|
||||||
|
%find_lang %{name}
|
||||||
|
|
||||||
|
%check
|
||||||
|
make check
|
||||||
|
|
||||||
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
|
%files -f %{name}.lang
|
||||||
|
%license COPYING
|
||||||
|
%doc CHANGES
|
||||||
|
%{_sysconfdir}/popt.d
|
||||||
|
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
||||||
|
/%{_lib}/libpopt.so.*
|
||||||
|
%else
|
||||||
|
%{_libdir}/libpopt.so.*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%doc README
|
||||||
|
%{_libdir}/libpopt.so
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
%{_includedir}/popt.h
|
||||||
|
%{_mandir}/man3/popt.3*
|
||||||
|
|
||||||
|
%files static
|
||||||
|
%{_libdir}/libpopt.a
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-14
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.16-13
|
||||||
|
- Switch to %%ldconfig_scriptlets
|
||||||
|
|
||||||
|
* Thu Oct 12 2017 Robert Scheck <robert@fedoraproject.org> 1.16-12
|
||||||
|
- Added upstream patch to handle glob(3) error returns (#1051685)
|
||||||
|
|
||||||
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-11
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 28 2017 Peter Jones <pjones@redhat.com> - 1.16-10
|
||||||
|
- Make it use %%autosetup -S git
|
||||||
|
- Fix a memory leak
|
||||||
|
|
||||||
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.16-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.16-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jun 26 2014 Panu Matilainen <pmatilai@redhat.com> - 1.16-4
|
||||||
|
- Mark license as such, not documentation
|
||||||
|
|
||||||
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.16-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 08 2014 Robert Scheck <robert@fedoraproject.org> 1.16-2
|
||||||
|
- Added patch to have --help and --usage translatable (#734434)
|
||||||
|
|
||||||
|
* Sun Nov 24 2013 Robert Scheck <robert@fedoraproject.org> 1.16-1
|
||||||
|
- Upgrade to 1.16 (#448286, #999377)
|
||||||
|
- Tight run-time dependencies between sub-packages via %%{?_isa}
|
||||||
|
- Added patch for spelling mistakes in popt man page (#675567)
|
||||||
|
|
||||||
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-15
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-14
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Dec 14 2012 Panu Matilainen <pmatilai@redhat.com> - 1.13-13
|
||||||
|
- Remove useless doxygen docs to eliminate multilib conflicts (#533829)
|
||||||
|
|
||||||
|
* Thu Aug 02 2012 Panu Matilainen <pmatilai@redhat.com> - 1.13-12
|
||||||
|
- Hack poptBadOption() to return something semi-meaningful on exec alias
|
||||||
|
failures (#697435, #710267)
|
||||||
|
- Run internal test-suite on build, minimal as it might be
|
||||||
|
|
||||||
|
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-11
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 14 2011 Panu Matilainen <pmatilai@redhat.com>
|
||||||
|
- Backport upstream patch to fix --opt=<arg> syntax for aliases (#293531)
|
||||||
|
|
||||||
|
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Feb 16 2010 Robert Scheck <robert@fedoraproject.org> 1.13-7
|
||||||
|
- Solved multilib problems at doxygen generated files (#517509)
|
||||||
|
|
||||||
|
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Feb 23 2009 Robert Scheck <robert@fedoraproject.org> 1.13-5
|
||||||
|
- Rebuilt against gcc 4.4 and rpm 4.6
|
||||||
|
|
||||||
|
* Sun May 25 2008 Robert Scheck <robert@fedoraproject.org> 1.13-4
|
||||||
|
- Solved multilib problems at doxygen generated files (#342921)
|
||||||
|
|
||||||
|
* Wed Feb 20 2008 Robert Scheck <robert@fedoraproject.org> 1.13-3
|
||||||
|
- Revert the broken bind_textdomain_codeset() patch (#433324)
|
||||||
|
|
||||||
|
* Thu Feb 14 2008 Robert Scheck <robert@fedoraproject.org> 1.13-2
|
||||||
|
- Added patch to work around missing bind_textdomain_codeset()
|
||||||
|
|
||||||
|
* Sun Dec 30 2007 Robert Scheck <robert@fedoraproject.org> 1.13-1
|
||||||
|
- Upgrade to 1.13 (#290531, #332201, #425803)
|
||||||
|
- Solved multilib problems at doxygen generated files (#342921)
|
||||||
|
|
||||||
|
* Thu Aug 23 2007 Robert Scheck <robert@fedoraproject.org> 1.12-3
|
||||||
|
- Added buildrequirement to graphviz (#249352)
|
||||||
|
- Backported bugfixes from CVS (#102254, #135428 and #178413)
|
||||||
|
|
||||||
|
* Sun Aug 12 2007 Robert Scheck <robert@fedoraproject.org> 1.12-2
|
||||||
|
- Move libpopt to /lib[64] (#249814)
|
||||||
|
- Generate API documentation, added buildrequirement to doxygen
|
||||||
|
|
||||||
|
* Mon Jul 23 2007 Robert Scheck <robert@fedoraproject.org> 1.12-1
|
||||||
|
- Changes to match with Fedora Packaging Guidelines (#249352)
|
||||||
|
|
||||||
|
* Tue Jul 10 2007 Jeff Johnson <jbj@rpm5.org>
|
||||||
|
- release popt-1.12 through rpm5.org.
|
||||||
|
|
||||||
|
* Sat Jun 9 2007 Jeff Johnson <jbj@rpm5.org>
|
||||||
|
- release popt-1.11 through rpm5.org.
|
||||||
|
|
||||||
|
* Thu Dec 10 1998 Michael Johnson <johnsonm@redhat.com>
|
||||||
|
- released 1.2.2; see CHANGES
|
||||||
|
|
||||||
|
* Tue Nov 17 1998 Michael K. Johnson <johnsonm@redhat.com>
|
||||||
|
- added man page to default install
|
||||||
|
|
||||||
|
* Thu Oct 22 1998 Erik Troan <ewt@redhat.com>
|
||||||
|
- see CHANGES file for 1.2
|
||||||
|
|
||||||
|
* Thu Apr 09 1998 Erik Troan <ewt@redhat.com>
|
||||||
|
- added ./configure step to spec file
|
Loading…
Reference in New Issue
Block a user