Sync from SUSE:SLFO:Main popt revision 3a1bbe9eca298524dcb421a41f7e8972
This commit is contained in:
commit
43dee7ab5c
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
5
baselibs.conf
Normal file
5
baselibs.conf
Normal file
@ -0,0 +1,5 @@
|
||||
libpopt0
|
||||
obsoletes "popt-<targettype> <= <version>"
|
||||
popt-devel
|
||||
requires -"popt-<targettype> = <version>"
|
||||
requires "libpopt0-<targettype> = <version>"
|
BIN
popt-1.19.tar.gz
(Stored with Git LFS)
Normal file
BIN
popt-1.19.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
87
popt-libc-updates.patch
Normal file
87
popt-libc-updates.patch
Normal file
@ -0,0 +1,87 @@
|
||||
Index: popt-1.19/configure.ac
|
||||
===================================================================
|
||||
--- popt-1.19.orig/configure.ac
|
||||
+++ popt-1.19/configure.ac
|
||||
@@ -9,7 +9,6 @@ AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_INIT_AUTOMAKE([1.10 foreign -Wall])
|
||||
|
||||
m4_version_prereq([2.70], [], [AC_PROG_CC_STDC])
|
||||
-AC_PROG_CC
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AM_PROG_AR
|
||||
|
||||
Index: popt-1.19/src/system.h
|
||||
===================================================================
|
||||
--- popt-1.19.orig/src/system.h
|
||||
+++ popt-1.19/src/system.h
|
||||
@@ -2,9 +2,7 @@
|
||||
* @file
|
||||
*/
|
||||
|
||||
-#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
-#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -57,6 +55,8 @@ static inline char * stpcpy (char *dest,
|
||||
#define getenv(_s) secure_getenv(_s)
|
||||
#elif defined(HAVE___SECURE_GETENV)
|
||||
#define getenv(_s) __secure_getenv(_s)
|
||||
+#else
|
||||
+#error neither secure_getenv nor __secure_getenv is available
|
||||
#endif
|
||||
|
||||
#if !defined(__GNUC__) && !defined(__attribute__)
|
||||
Index: popt-1.19/src/popt.c
|
||||
===================================================================
|
||||
--- popt-1.19.orig/src/popt.c
|
||||
+++ popt-1.19/src/popt.c
|
||||
@@ -181,7 +181,7 @@ poptContext poptGetContext(const char *
|
||||
con->execAbsolute = 1;
|
||||
con->arg_strip = NULL;
|
||||
|
||||
- if (getenv("POSIXLY_CORRECT") || getenv("POSIX_ME_HARDER"))
|
||||
+ if (secure_getenv("POSIXLY_CORRECT") || secure_getenv("POSIX_ME_HARDER"))
|
||||
con->flags |= POPT_CONTEXT_POSIXMEHARDER;
|
||||
|
||||
if (name)
|
||||
@@ -418,7 +418,7 @@ const char * findProgramPath(const char
|
||||
if (strchr(argv0, '/'))
|
||||
return xstrdup(argv0);
|
||||
|
||||
- if ((path = getenv("PATH")) == NULL || (path = xstrdup(path)) == NULL)
|
||||
+ if ((path = secure_getenv("PATH")) == NULL || (path = xstrdup(path)) == NULL)
|
||||
return NULL;
|
||||
|
||||
/* The return buffer in t is big enough for any path. */
|
||||
@@ -1633,6 +1633,7 @@ const char * poptBadOption(poptContext c
|
||||
|
||||
const char * poptStrerror(const int error)
|
||||
{
|
||||
+ char errbuf[1024];
|
||||
switch (error) {
|
||||
case POPT_ERROR_NOARG:
|
||||
return POPT_("missing argument");
|
||||
@@ -1657,7 +1658,7 @@ const char * poptStrerror(const int erro
|
||||
case POPT_ERROR_BADCONFIG:
|
||||
return POPT_("config file failed sanity test");
|
||||
case POPT_ERROR_ERRNO:
|
||||
- return strerror(errno);
|
||||
+ return strerror_r(errno, errbuf, sizeof errbuf);
|
||||
default:
|
||||
return POPT_("unknown error");
|
||||
}
|
||||
Index: popt-1.19/src/poptconfig.c
|
||||
===================================================================
|
||||
--- popt-1.19.orig/src/poptconfig.c
|
||||
+++ popt-1.19/src/poptconfig.c
|
||||
@@ -467,7 +467,7 @@ int poptReadDefaultConfig(poptContext co
|
||||
if (rc) goto exit;
|
||||
#endif
|
||||
|
||||
- if ((home = getenv("HOME"))) {
|
||||
+ if ((home = secure_getenv("HOME"))) {
|
||||
char * fn = malloc(strlen(home) + 20);
|
||||
if (fn != NULL) {
|
||||
(void) stpcpy(stpcpy(fn, home), "/.popt");
|
217
popt.changes
Normal file
217
popt.changes
Normal file
@ -0,0 +1,217 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 17 16:31:44 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- popt 1.19:
|
||||
* various build system fixes
|
||||
* various developer visible fixes
|
||||
* Fix the handling of superfluous args passed with =
|
||||
* Fix multiple resource and memory leaks
|
||||
* Fix '=' getting shown for short options
|
||||
* Improve random number handling
|
||||
* translation updates and documentation improvements
|
||||
- refresh spec file, run tests, package license in every package,
|
||||
and treat all compiler warnings and errors
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 7 10:56:25 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
|
||||
|
||||
- Create lang subpackage
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 24 00:12:29 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update homepage URL.
|
||||
- Drop old rpm constructs.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 26 15:22:02 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
|
||||
|
||||
- Update to version 1.18:
|
||||
* fix an ugly and ancient security issue with popt failing to drop privileges on alias exec from a SUID/SGID program
|
||||
* perform rudimentary sanity checks when reading in popt config files
|
||||
* collect accumulated misc fixes (memleaks etc) from distros
|
||||
* convert translations to utf-8 encoding
|
||||
* convert old postscript documentation to pdf
|
||||
* dust off ten years worth of autotools sediment
|
||||
* reorganize and clean up the source tree for clarity
|
||||
* remove the obnoxious splint annotations from the sources
|
||||
- popt-alignment-checks.patch removed: contained in upstream
|
||||
- popt-libc-updates.patch changed: to be compatible with new version.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 10 12:53:55 UTC 2020 - Adrian Schröter <adrian@suse.de>
|
||||
|
||||
- fix URLs, rpm5.org is no more
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 26 13:22:41 UTC 2019 - meissner@suse.com
|
||||
|
||||
- build a 32bit library generically, for use by 32bit fuzzing
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 22 15:10:44 UTC 2018 - fvogt@suse.com
|
||||
|
||||
- Use %license (boo#1082318)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 8 19:29:17 UTC 2017 - jengelh@inai.de
|
||||
|
||||
- Remove --with-pic which is only for static libs.
|
||||
- Fix RPM groups.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 7 14:25:32 UTC 2013 - schwab@suse.de
|
||||
|
||||
- popt-alignment-checks.patch: fix alignment checks
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 7 16:34:40 UTC 2013 - jengelh@inai.de
|
||||
|
||||
- Fix typo in popt-libc-updates.patch that prevented it to work
|
||||
with glibc before 2.17.
|
||||
- More robust make install call; remove redundant %clean section
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 14 15:15:49 UTC 2013 - coolo@suse.com
|
||||
|
||||
- fix popt-libc-updates.patch to work also with automake 1.13
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 15 09:58:18 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Add Source URL, see https://en.opensuse.org/SourceUrls
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 13 19:53:36 UTC 2013 - crrodriguez@opensuse.org
|
||||
|
||||
- Remove patches:
|
||||
- config-guess-sub-update.patch
|
||||
- popt-secure-getenv.patch
|
||||
run autoreconf instead .
|
||||
- popt-libc-updates.patch replaces popt-secure-getenv.patch
|
||||
* test for secure_getenv instead of __secure_getenv
|
||||
* update configure.ac so it can be regenerated with modern
|
||||
autotools.
|
||||
* Internal symbols are already hidden with a linker script,
|
||||
improve that by hidding symbols with the compiler too.
|
||||
* use strerror_r instead of strerror in the library.
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 11 19:31:36 UTC 2013 - crrodriguez@opensuse.org
|
||||
|
||||
- popt wants __secure_getenv at configure time, but This
|
||||
function is no longer available as of glibc 2.17.
|
||||
test for secure_getenv() instead (popt-secure-getenv.patch)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 4 16:09:56 UTC 2013 - dmueller@suse.com
|
||||
|
||||
- Add config-guess-sub-update.patch:
|
||||
* Update config.guess/sub for AArch64
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 25 09:25:40 UTC 2013 - cfarrell@suse.com
|
||||
|
||||
- license update: X11
|
||||
New spdx.org license list now contains an official entry for X11
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 22 12:55:33 UTC 2012 - cfarrell@suse.com
|
||||
|
||||
- license update: SUSE-XFree86-1.0
|
||||
This is not the MIT license but rather the old version of the XFree86
|
||||
license (which is not upstream at spdx.org/Ãlicenses - hence the SUSE
|
||||
proprietary prefix)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 12 21:38:30 UTC 2012 - crrodriguez@opensuse.org
|
||||
|
||||
- Libraries back into %{_libdir}, /usr merge project.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 9 11:09:27 UTC 2011 - jengelh@medozas.de
|
||||
|
||||
- Add pkgconfig to BuildRequires to get automatic pkgconfig(popt)
|
||||
provides
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 2 08:35:00 UTC 2011 - andreas.hanke@gmx-topmail.de
|
||||
|
||||
- don't build libpopt.a
|
||||
- don't list popt.mo files twice
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 16 14:25:52 UTC 2011 - coolo@novell.com
|
||||
|
||||
- use %find_lang
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 19 15:05:30 CEST 2010 - dimstar@opensuse.org
|
||||
|
||||
- Update to version 1.16:
|
||||
+ Include xcode prject files in distributed tar ball
|
||||
+ Build system fixes
|
||||
+ Provide popt.pc
|
||||
+ Extended test suite
|
||||
+ Various fixes
|
||||
- Changes from version 1.15:
|
||||
+ Build system fixes
|
||||
+ avoid displaying --[no]nofoo with POPT_ARGFLAG_TOGGLE.
|
||||
+ reserve a bit for --[no]opt prefix toggling.
|
||||
+ trim out escaped newline(s) from file content, other fixes.
|
||||
+ check/print argv[0] in --help for NULL.
|
||||
+ misc fixes
|
||||
- Changes from version 1.14:
|
||||
+ Build system fixes
|
||||
+ permit "#define POPT_fprintf fprintf" to lose the malloc'ing
|
||||
fprintf
|
||||
+ Many fixes.
|
||||
+ Updated translations
|
||||
- Drop popt-1.13-popt_fprintf.diff: Should all be fixed upstream.
|
||||
In case POPT_fprintf really still does not suffice, we can just
|
||||
use "#define POPT_fprintf frptinf" and be set. The code is
|
||||
prepared for this override.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de
|
||||
|
||||
- use %_smp_mflags
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 7 17:06:09 CEST 2010 - mls@suse.de
|
||||
|
||||
- make libpopt0-32bit obsolete popt-32bit [bnc#544964]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 1 12:26:16 UTC 2010 - jengelh@medozas.de
|
||||
|
||||
- remove sparcv9-specific baselib exceptions (not needed)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 12 18:40:03 CET 2009 - jengelh@medozas.de
|
||||
|
||||
- enable parallel building
|
||||
- add baselibs.conf as a source
|
||||
- add baselibs for SPARC
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 28 15:42:48 CEST 2009 - mrueckert@suse.de
|
||||
|
||||
- add back baselibs.conf. bootstrap done
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 28 15:38:46 CEST 2009 - mrueckert@suse.de
|
||||
|
||||
- disable baselibs.conf for the moment
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 26 16:08:58 CEST 2009 - mls@suse.de
|
||||
|
||||
- add baselibs.conf
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 21 19:30:12 CEST 2009 - mls@suse.de
|
||||
|
||||
- initial release
|
||||
|
109
popt.spec
Normal file
109
popt.spec
Normal file
@ -0,0 +1,109 @@
|
||||
#
|
||||
# spec file for package popt
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define soname libpopt0
|
||||
Name: popt
|
||||
Version: 1.19
|
||||
Release: 0
|
||||
Summary: A C library for parsing command line parameters
|
||||
License: MIT
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: https://github.com/rpm-software-management/popt
|
||||
Source0: http://ftp.rpm.org/popt/releases/popt-1.x/popt-%{version}.tar.gz
|
||||
Source2: baselibs.conf
|
||||
Patch0: popt-libc-updates.patch
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkgconfig
|
||||
#!BuildIgnore: rpmlint-Factory
|
||||
|
||||
%description
|
||||
Popt is a C library for parsing command line parameters. Popt was
|
||||
heavily influenced by the getopt() and getopt_long() functions. 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 -n %{soname}
|
||||
Summary: A C library for parsing command line parameters
|
||||
Group: System/Libraries
|
||||
Provides: popt = %{version}
|
||||
Obsoletes: popt < %{version}
|
||||
|
||||
%description -n %{soname}
|
||||
Popt is a C library for parsing command line parameters. Popt was
|
||||
heavily influenced by the getopt() and getopt_long() functions. 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/C and C++
|
||||
Requires: %{soname} = %{version}
|
||||
Requires: glibc-devel
|
||||
|
||||
%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.
|
||||
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
autoreconf -fiv
|
||||
%configure \
|
||||
--disable-static \
|
||||
--enable-werror \
|
||||
%{nil}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%check
|
||||
%make_build check
|
||||
|
||||
%post -n %{soname} -p /sbin/ldconfig
|
||||
%postun -n %{soname} -p /sbin/ldconfig
|
||||
|
||||
%files -n %{soname}
|
||||
%license COPYING
|
||||
%{_libdir}/libpopt.so.*
|
||||
|
||||
%files lang -f %{name}.lang
|
||||
%license COPYING
|
||||
|
||||
%files devel
|
||||
%license COPYING
|
||||
%doc README
|
||||
%{_libdir}/libpopt.so
|
||||
%{_includedir}/popt.h
|
||||
%{_mandir}/man3/popt.3%{?ext_man}
|
||||
%{_libdir}/pkgconfig/popt.pc
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user