Compare commits

...

No commits in common. "c8" and "c9" have entirely different histories.
c8 ... c9

4 changed files with 156 additions and 30 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/release-v33.3.1.tar.gz
SOURCES/lua-posix-35.0.tar.gz

View File

@ -1 +1 @@
200d9a6e0b0a62b2705e3405c99e5c5e70bfd8ce SOURCES/release-v33.3.1.tar.gz
31a8c48fc57ff1a4199df27618e098beabcee946 SOURCES/lua-posix-35.0.tar.gz

View File

@ -0,0 +1,70 @@
commit 4788eba65956aa9347bbb5856c9208888a20330b
Author: Gary V. Vaughan <gary@gnu.org>
Date: Thu Sep 9 12:40:55 2021 -0700
maint: sync luke with upstream.
* build-aux/luke: Propagates LDFLAGS to module compilation commands
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
diff --git a/build-aux/luke b/build-aux/luke
index 9f476f7..9d74aa2 100755
--- a/build-aux/luke
+++ b/build-aux/luke
@@ -17,10 +17,10 @@ end,fatal=fatal,}
end
package.preload['luke.cli']=function()
local _ENV=require'std.normalize'{'luke._base','luke.lukefile','luke.platforms','std.functional',}local function version()print[[
-luke (Luke) 0.2.0
+luke (Luke) 0.2.2
Written by Gary V. Vaughan <gary@gnu.org>, 2014
-Copyright (C) 2020, Gary V. Vaughan
+Copyright (C) 2021, Gary V. Vaughan
Luke comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Luke under the terms of the MIT license;
it may be used for any purpose at absolutely no cost, without permission.
@@ -102,7 +102,7 @@ abspath=abspath..'.lua'return src,(gsub(abspath,'/[^/]+%.lua$',''))end
local function module_to_path(module,sources,objdir)return dropuntil(sources,function(source)return case(source,{['.*%.[ch]']=bind(c_source,{module,objdir}),['(.*%.[ch])%.in']=bind(c_source,{module,objdir}),['.*%.lua']=bind(lua_source,{module}),['(.*%.lua)%.in']=bind(lua_source,{module}),function(src)fatal("unsupported source type '%s'",src)end,})end)end
return{build_c_module=function(L,env,luke,name)local rules=luke.modules[name]local c_module=c_module_path(luke.variables.objdir,name)local command={'$MAKEDIRS',dirname(c_module)}local status,err,out=spawn(env,unpack(command))if status~=0 then
stdout:write(concat(command,' ')..'\n')stderr:write(err..'\n')exit(status)end
-return run(L,env,flatten('$CC $CFLAGS $LIBFLAG $PKGFLAGS $CPPFLAGS',defines(env,except(list(rules.defines,luke.defines),nil)),incdirs(rules.incdirs,luke.incdirs),rules.sources,'-o',c_module,libdirs(rules.libdirs,luke.libdirs),'$LIBS',rules.libraries,luke.libraries))end,c_modules=function(modules)return filter(keys(modules),function(name)return dropuntil(modules[name].sources,bind(match,{[2]='%.[ch]$'}))end)end,incdirs=incdirs,install_modules=function(L,env,luke,modules)return reduce(keys(modules),0,function(status,name)if status==0 then
+return run(L,env,flatten('$CC $CFLAGS $LIBFLAG $PKGFLAGS $CPPFLAGS',defines(env,except(list(rules.defines,luke.defines),nil)),incdirs(rules.incdirs,luke.incdirs),rules.sources,'-o',c_module,'$LDFLAGS',libdirs(rules.libdirs,luke.libdirs),'$LIBS',rules.libraries,luke.libraries))end,c_modules=function(modules)return filter(keys(modules),function(name)return dropuntil(modules[name].sources,bind(match,{[2]='%.[ch]$'}))end)end,incdirs=incdirs,install_modules=function(L,env,luke,modules)return reduce(keys(modules),0,function(status,name)if status==0 then
local src,dir=module_to_path(name,modules[name].sources,luke.variables.objdir)if not exists(interpolate(env,dir))then
status=run(L,env,{'$MAKEDIRS',dir})end
if status==0 then
@@ -135,6 +135,15 @@ return with(File(progpath,'r'),function(h)return h and isfile(h.context)and prog
end)end)L.log(found and'found '..found or prog..' not found')return found~=nil
end
local function check_header_compile(L,env,config,header,extra_hdrs)return with(CTest(),function(conftest)conftest:write(format('%s\n#include "%s"\n',extra_hdrs,header))return logspawn(L,env,compile_command(L,env,config,conftest.filename))end)end
+local function check_struct_member_compile(L,env,config,structname,member,extra_hdrs)return with(CTest(),function(conftest)conftest:write(format([[
+%s
+int main () {
+static %s aggr;
+if (sizeof aggr.%s)
+ return 0;
+return 0;
+}
+]],extra_hdrs,structname,member))return logspawn(L,env,compile_command(L,env,config,conftest.filename))end)end
local function try_link(L,env,config,lib,symbol)return with(CTest(),TmpFile(),function(conftest,a_out)conftest:write(format([[
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
@@ -225,7 +234,7 @@ end
CONFIGENV.libs=lib..CONFIGENV.libs
end
return found_library(L,lib)end
-end)or call(function()L.verbose'\n'fatal("required symbol '%s' not found in any of libc, lib%s",symbol,concat(libraries,', lib'))end)end},{checkfunc=function(L,env,config)checking(L,'for',config.checkfunc)return found_result(L,check_func_link(L,env,config,config.checkfunc))end}),{__call=function(self,L,env,config,prefix)return case(type(config),{['number']=function()return str(config)end,['string']=function()return config
+end)or call(function()L.verbose'\n'fatal("required symbol '%s' not found in any of libc, lib%s",symbol,concat(libraries,', lib'))end)end},{checkfunc=function(L,env,config)checking(L,'for',config.checkfunc)return found_result(L,check_func_link(L,env,config,config.checkfunc))end},{checkmember=function(L,env,config)checking(L,'for',config.checkmember)local extra_hdrs=concat(format_includes(config.includes),'\n')local i=find(config.checkmember,'%.')local structname=sub(config.checkmember,1,i-1)local member=sub(config.checkmember,i+1)return found_result(L,check_struct_member_compile(L,env,config,structname,member,extra_hdrs))end}),{__call=function(self,L,env,config,prefix)return case(type(config),{['number']=function()return str(config)end,['string']=function()return config
end,['table']=function()return dropuntil(self,function(fname)if config[fname]~=nil then
add_external_deps(env,config,prefix)return apply(self[fname],list(L,env,config))end
end)or fatal("unable to configure with keys '%s'",concat(keys(config),"', '"))end,function(type)fatal("unsupported configure type '%s'",type)end,})end,})return{config_compiler=function(L,env)local CC=env.CC
@@ -588,7 +597,7 @@ end
return setmetatable({append=function(seq,v)local n=(int(seq.n)or len(seq))+1
seq.n,seq[n]=n,v
return seq
-end,arg=arg,assert=assert,char=string.char,close=io.close,concat=concat,copy=copy,dirsep=dirsep,exit=os.exit,format=string.format,getenv=os.getenv,getmetatable=getmetatable,getmetamethod=getmetamethod,gmatch=string.gmatch,gsub=string.gsub,int=int,iscallable=iscallable,len=len,lines=io.lines,list=pack,loadstring=loadstring,match=string.match,maxn=function(iterable)local n=0
+end,arg=arg,assert=assert,char=string.char,close=io.close,concat=concat,copy=copy,dirsep=dirsep,exit=os.exit,find=string.find,format=string.format,getenv=os.getenv,getmetatable=getmetatable,getmetamethod=getmetamethod,gmatch=string.gmatch,gsub=string.gsub,int=int,iscallable=iscallable,len=len,lines=io.lines,list=pack,loadstring=loadstring,match=string.match,maxn=function(iterable)local n=0
for k,v in next,iterable or{}do
local i=int(k)if i and i>n then
n=i

View File

@ -5,57 +5,113 @@
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: lua-posix
Version: 33.3.1
Release: 9%{?dist}
Version: 35.0
Release: 8%{?dist}
Summary: A POSIX library for Lua
Group: Development/Libraries
License: MIT
URL: http://luaforge.net/projects/luaposix/
Source0: https://github.com/luaposix/luaposix/archive/release-v%{version}.tar.gz
Source0: https://github.com/luaposix/luaposix/archive/v%{version}/lua-posix-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: lua-devel
BuildRequires: ncurses-devel
BuildRequires: lua-lunit
BuildRequires: perl-interpreter
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: lua(abi) = %{luaver}
%else
Requires: lua >= %{luaver}
%endif
%{?lua_requires}
# Fixes passing LDFLAGS into the build, in upstream release 35.1
# https://github.com/luaposix/luaposix/commit/4788eba65956aa9347bbb5856c9208888a20330b
Patch0: propagate_ldflags.patch
%description
This is a POSIX library for Lua which provides access to many POSIX features
to Lua programs.
%prep
%setup -q -n luaposix-release-v%{version}
%setup -q -n luaposix-%{version}
%patch0 -p1
%build
%configure --libdir=%{lualibdir} --datadir=/%{luapkgdir}
make V=1 %{?_smp_mflags}
build-aux/luke CFLAGS="%build_cflags" LDFLAGS="%build_ldflags"
%install
make install DESTDIR=$RPM_BUILD_ROOT
build-aux/luke install PREFIX=%{buildroot}%{_prefix} INST_LIBDIR=%{buildroot}%{lua_libdir}
%check
make V=1 check
#check
# Tests require specl which is not yet packaged
%files
%license COPYING
%doc AUTHORS ChangeLog NEWS README
%{_defaultdocdir}/luaposix/
%{lualibdir}/*
%{luapkgdir}/*.lua
%{luapkgdir}/posix/
%license LICENSE
%doc AUTHORS ChangeLog.old NEWS.md README.md
%{lua_libdir}/*
%{lua_pkgdir}/posix/
%changelog
* Fri Jul 20 2018 Bastien Nocera <bnocera@redhat.com> - 33.3.1-9
+ lua-posix-33.3.1-9
- Correct License field, it's MIT, not Public Domain
* Thu Feb 24 2022 Jiri Vanek <jvanek@redhat.com> - 35.0-8
- Added tests.yaml
- Resolves: rhbz#2058499
* Thu Feb 24 2022 Jiri Vanek <jvanek@redhat.com> - 35.0-7
- Added gating.yaml
- Resolves: rhbz#2054488
* Mon Feb 14 2022 Andrew Hughes <gnu.andrew@redhat.com> - 35.0-6
- Pass LDFLAGS to the build so RPM linker flags are used and annocheck passes.
- Add patch from upstream to fix propagation of LDFLAGS into build system.
- Resolves: rhbz#2044879
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 35.0-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 35.0-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 35.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 35.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 10 2020 Orion Poplawski <orion@nwra.com> - 35.0-1
- Update to 35.0
* Fri Jul 03 2020 Orion Poplawski <orion@nwra.com> - 34.1.1-2
- Fix bit32 patch
- More lua 5.4 fixes
* Fri Jul 03 2020 Orion Poplawski <orion@nwra.com> - 34.1.1-1
- Update to 34.1.1 (bz#1849450)
* Mon Jun 29 2020 Tom Callaway <spot@fedoraproject.org> - 33.3.1-17
- hack this ancient beastie to work with lua 5.4
- maintainer, please update this to the current upstream release at your earliest convenience
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 33.3.1-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jan 22 2020 Owen Taylor <otaylor@redhat.com> - 33.3.1-15
- Use RPM macros from lua-devel
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 33.3.1-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 33.3.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 33.3.1-12
- Rebuilt for libcrypt.so.2 (#1666033)
* Wed Jul 25 2018 Bastien Nocera <bnocera@redhat.com> - 33.3.1-11
+ lua-posix-33.3.1-11
- Correct License field, it's been MIT since 2011, not
Public Domain (#1605203)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 33.3.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 33.3.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 33.3.1-8
- Rebuilt for switch to libxcrypt