libcap rebuild

This commit is contained in:
Rmys
2023-04-12 15:31:16 +03:00
parent 592d1a3844
commit e1abfdfe27
2 changed files with 102 additions and 72 deletions
+33 -14
View File
@@ -4,29 +4,48 @@
# Licensed under the GNU General Public License, version 3. # Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt # See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import get
from pisi.actionsapi import autotools from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools from pisi.actionsapi import shelltools
from pisi.actionsapi import get
pam = "no" if get.buildTYPE() == "emul32" else "yes"
cc = "'gcc -m32'" if get.buildTYPE() == "emul32" else "'gcc'"
pisitools.cflags.add("-D_LARGEFILE64_SOURCE", "-D_FILE_OFFSET_BITS=64")
def setup(): def setup():
shelltools.export("CFLAGS", "%s -fPIC" % get.CFLAGS()) # fix linkage
autotools.autoreconf("-vfi") pisitools.dosed("pam_cap/Makefile", "(.*<\s\$\(LDLIBS\))", r"\1 -lpam")
autotools.configure("--prefix=/usr \ # no static libs
--enable-ipv6 \ #pisitools.dosed("libcap/Makefile", "install.*STALIBNAME", deleteLine=True)
--enable-bluetooth") shelltools.system("sed -i '/install -m.*STA/d' libcap/Makefile")
# change shared libs mode
#pisitools.dosed("libcap/Makefile", "(.*?install -m) 0644 (.*?MINLIBNAME.*)", r"\1 0755 \2")
# use pisilinux flags
#pisitools.dosed("Make.Rules", "^(CC|CFLAGS|LD)\s:=.*", deleteLine=True)
pisitools.dosed("Make.Rules", "^(PAM_CAP\s:=).*", r"\1 %s" % ("no" if get.buildTYPE() == "emul32" else "yes"))
def build(): def build():
autotools.make("all") autotools.make("prefix=/usr lib=lib%s PAM_CAP=%s CC=%s" % ("32" if get.buildTYPE() == "emul32" else "", pam, cc))
autotools.make("shared")
#def check():
#autotools.make("test -k CC=%s PAM_CAP=%s" % (cc, pam))
def install(): def install():
autotools.rawInstall('DESTDIR="%s"' % get.installDIR()) if get.buildTYPE() == "emul32":
autotools.rawInstall("DESTDIR=%s prefix=/usr lib=lib32 SBINDIR=/_emul32 MANDIR=/_emul32 RAISE_SETFCAP=no PAM_CAP=no" % get.installDIR())
pisitools.removeDir("/_emul32")
return
# No static libs autotools.rawInstall("prefix=/usr DESTDIR=%s SBINDIR=/sbin RAISE_SETFCAP=no" % (get.installDIR()))
pisitools.remove("/usr/lib/*.a")
# it is needed for ppd etc. pisitools.insinto("/etc/security", "pam_cap/capability.conf")
pisitools.insinto("/usr/include", "pcap-int.h")
pisitools.dodoc("CHANGES", "CREDITS", "README*", "VERSION", "TODO") pisitools.dodoc("CHANGELOG", "License", "README", "doc/capability.notes")
+69 -58
View File
@@ -1,120 +1,131 @@
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd"> <!DOCTYPE PISI SYSTEM "https://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI> <PISI>
<Source> <Source>
<Name>libpcap</Name> <Name>libcap</Name>
<Homepage>http://www.tcpdump.org/</Homepage> <Homepage>http://www.kernel.org/pub/linux/libs/security/linux-privs/</Homepage>
<Packager> <Packager>
<Name>PisiLinux Community</Name> <Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email> <Email>admins@pisilinux.org</Email>
</Packager> </Packager>
<License>GPLv2</License>
<License>BSD</License> <License>BSD</License>
<IsA>library</IsA> <IsA>library</IsA>
<Summary>A system-independent library for user-level network packet capture</Summary> <Summary>POSIX 1003.1e capabilities library</Summary>
<Description>libpcap (Packet CAPture) provides a portable framework for low-level network monitoring. Applications include network statistics collection, security monitoring, network debugging, etc.</Description> <Description>libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) draft 15 capabilities.</Description>
<Archive sha1sum="818cbe70179c73eebfe1038854665f33aac64245" type="targz">http://www.tcpdump.org/release/libpcap-1.10.4.tar.gz</Archive> <Archive sha1sum="a18f18bd99201821e686cd7a980348b7e01d71d5" type="tarxz">https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.67.tar.xz</Archive>
<BuildDependencies> <BuildDependencies>
<Dependency>bluez-libs-devel</Dependency> <Dependency>attr-devel</Dependency>
<!--<Dependency>libnl-devel</Dependency>--> <Dependency>pam-devel</Dependency>
<!--<Dependency>libusb-devel</Dependency>-->
<!--<Dependency>dbus-devel</Dependency>-->
</BuildDependencies> </BuildDependencies>
<Patches>
<!--<Patch>libpcap-1.1-cross-linux.patch</Patch>-->
<!--<Patch level="1">libpcap-1.1.1-ignore-ENODEV.patch</Patch>-->
<!--<Patch level="1">libpcap-1.8.1-enable_bluetooth-1.patch</Patch>-->
<!--<Patch>disable-remote.diff</Patch>-->
</Patches>
</Source> </Source>
<Package> <Package>
<Name>libpcap</Name> <Name>libcap</Name>
<RuntimeDependencies> <RuntimeDependencies>
<!--<Dependency>bluez</Dependency>--> <Dependency>pam</Dependency>
<!--<Dependency>libnl</Dependency>--> <Dependency>attr</Dependency>
<!--<Dependency>dbus</Dependency>-->
<!--<Dependency>libusb</Dependency>-->
</RuntimeDependencies> </RuntimeDependencies>
<Files> <Files>
<Path fileType="executable">/sbin</Path>
<Path fileType="library">/lib</Path>
<Path fileType="library">/usr/lib</Path> <Path fileType="library">/usr/lib</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="man">/usr/share/man</Path> <Path fileType="man">/usr/share/man</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="config">/etc</Path>
</Files> </Files>
</Package> </Package>
<Package> <Package>
<Name>libpcap-devel</Name> <Name>libcap-devel</Name>
<Summary>Development files for libpcap</Summary> <PartOf>system.devel</PartOf>
<Summary>Development files for libcap</Summary>
<RuntimeDependencies> <RuntimeDependencies>
<Dependency release="current">libpcap</Dependency> <Dependency release="current">libcap</Dependency>
</RuntimeDependencies> </RuntimeDependencies>
<Files> <Files>
<Path fileType="executable">/usr/bin/pcap-config</Path>
<Path fileType="header">/usr/include</Path> <Path fileType="header">/usr/include</Path>
<Path fileType="library">/usr/lib/pkgconfig</Path>
<Path fileType="man">/usr/share/man/man3</Path> <Path fileType="man">/usr/share/man/man3</Path>
</Files> </Files>
</Package> </Package>
<Package>
<Name>libcap-32bit</Name>
<PartOf>emul32</PartOf>
<Summary>32-bit shared libraries for libcap</Summary>
<BuildType>emul32</BuildType>
<BuildDependencies>
<Dependency>attr-32bit</Dependency>
</BuildDependencies>
<RuntimeDependencies>
<Dependency>attr-32bit</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib32</Path>
</Files>
</Package>
<History> <History>
<Update release="9"> <Update release="9">
<Date>2023-04-08</Date> <Date>2023-02-05</Date>
<Version>1.10.4</Version> <Version>2.67</Version>
<Comment>Version bump.</Comment> <Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name> <Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email> <Email>muscnsl@gmail.com</Email>
</Update> </Update>
<Update release="8"> <Update release="8">
<Date>2023-01-13</Date> <Date>2022-08-02</Date>
<Version>1.10.3</Version> <Version>2.65</Version>
<Comment>Version bump.</Comment> <Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name> <Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email> <Email>muscnsl@gmail.com</Email>
</Update> </Update>
<Update release="7"> <Update release="7">
<Date>2021-07-02</Date> <Date>2021-06-16</Date>
<Version>1.10.1</Version> <Version>2.27</Version>
<Comment>Version bump.</Comment> <Comment>Rebuild</Comment>
<Name>Mustafa Cinasal</Name> <Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email> <Email>muscnsl@gmail.com</Email>
</Update> </Update>
<Update release="6"> <Update release="6">
<Date>2020-02-01</Date> <Date>2020-12-09</Date>
<Version>1.9.1</Version> <Version>2.27</Version>
<Comment>Version bump.</Comment> <Comment>Rebuild</Comment>
<Name>Blue DeviL</Name>
<Email>bluedevil@sctzine.com</Email>
</Update>
<Update release="5">
<Date>2018-08-13</Date>
<Version>1.8.1</Version>
<Comment>Rebuild New T.</Comment>
<Name>Mustafa Cinasal</Name> <Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email> <Email>muscnsl@gmail.com</Email>
</Update> </Update>
<Update release="5">
<Date>2019-2-25</Date>
<Version>2.27</Version>
<Comment>Version bump</Comment>
<Name>Idris Kalp</Name>
<Email>idriskalp@gmail.com</Email>
</Update>
<Update release="4"> <Update release="4">
<Date>2017-05-15</Date> <Date>2018-07-15</Date>
<Version>1.8.1</Version> <Version>2.25</Version>
<Comment>Release Bump</Comment> <Comment>Rebuild</Comment>
<Name>Kamil Atlı</Name> <Name>Ertuğrul Erata</Name>
<Email>suvari@pisilinux.org</Email> <Email>ertugrulerata@gmail.com</Email>
</Update> </Update>
<Update release="3"> <Update release="3">
<Date>2016-06-09</Date> <Date>2017-09-20</Date>
<Version>1.8.1</Version> <Version>2.25</Version>
<Comment>Version Bump</Comment> <Comment>Rebuild.</Comment>
<Name>Kamil Atlı</Name> <Name>Ertuğrul Erata</Name>
<Email>suvari@pisilinux.org</Email> <Email>ertugrulerata@gmail.com</Email>
</Update> </Update>
<Update release="2"> <Update release="2">
<Date>2016-06-09</Date> <Date>2016-04-27</Date>
<Version>1.7.4</Version> <Version>2.25</Version>
<Comment>Release Bump</Comment> <Comment>Release Bump</Comment>
<Name>Pisi Linux Community</Name> <Name>PisiLinux Community</Name>
<Email>admin@pisilinux.org</Email> <Email>admin@pisilinux.org</Email>
</Update> </Update>
<Update release="1"> <Update release="1">
<Date>2016-03-25</Date> <Date>2016-03-02</Date>
<Version>1.7.4</Version> <Version>2.25</Version>
<Comment>First release</Comment> <Comment>First release</Comment>
<Name>Ertuğrul Erata</Name> <Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email> <Email>ertugrulerata@gmail.com</Email>