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.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
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():
shelltools.export("CFLAGS", "%s -fPIC" % get.CFLAGS())
autotools.autoreconf("-vfi")
autotools.configure("--prefix=/usr \
--enable-ipv6 \
--enable-bluetooth")
# fix linkage
pisitools.dosed("pam_cap/Makefile", "(.*<\s\$\(LDLIBS\))", r"\1 -lpam")
# no static libs
#pisitools.dosed("libcap/Makefile", "install.*STALIBNAME", deleteLine=True)
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():
autotools.make("all")
autotools.make("shared")
autotools.make("prefix=/usr lib=lib%s PAM_CAP=%s CC=%s" % ("32" if get.buildTYPE() == "emul32" else "", pam, cc))
#def check():
#autotools.make("test -k CC=%s PAM_CAP=%s" % (cc, pam))
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
pisitools.remove("/usr/lib/*.a")
autotools.rawInstall("prefix=/usr DESTDIR=%s SBINDIR=/sbin RAISE_SETFCAP=no" % (get.installDIR()))
# it is needed for ppd etc.
pisitools.insinto("/usr/include", "pcap-int.h")
pisitools.insinto("/etc/security", "pam_cap/capability.conf")
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" ?>
<!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>
<Source>
<Name>libpcap</Name>
<Homepage>http://www.tcpdump.org/</Homepage>
<Name>libcap</Name>
<Homepage>http://www.kernel.org/pub/linux/libs/security/linux-privs/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>GPLv2</License>
<License>BSD</License>
<IsA>library</IsA>
<Summary>A system-independent library for user-level network packet capture</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>
<Archive sha1sum="818cbe70179c73eebfe1038854665f33aac64245" type="targz">http://www.tcpdump.org/release/libpcap-1.10.4.tar.gz</Archive>
<Summary>POSIX 1003.1e capabilities library</Summary>
<Description>libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) draft 15 capabilities.</Description>
<Archive sha1sum="a18f18bd99201821e686cd7a980348b7e01d71d5" type="tarxz">https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.67.tar.xz</Archive>
<BuildDependencies>
<Dependency>bluez-libs-devel</Dependency>
<!--<Dependency>libnl-devel</Dependency>-->
<!--<Dependency>libusb-devel</Dependency>-->
<!--<Dependency>dbus-devel</Dependency>-->
<Dependency>attr-devel</Dependency>
<Dependency>pam-devel</Dependency>
</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>
<Package>
<Name>libpcap</Name>
<Name>libcap</Name>
<RuntimeDependencies>
<!--<Dependency>bluez</Dependency>-->
<!--<Dependency>libnl</Dependency>-->
<!--<Dependency>dbus</Dependency>-->
<!--<Dependency>libusb</Dependency>-->
<Dependency>pam</Dependency>
<Dependency>attr</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/sbin</Path>
<Path fileType="library">/lib</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="config">/etc</Path>
</Files>
</Package>
<Package>
<Name>libpcap-devel</Name>
<Summary>Development files for libpcap</Summary>
<Name>libcap-devel</Name>
<PartOf>system.devel</PartOf>
<Summary>Development files for libcap</Summary>
<RuntimeDependencies>
<Dependency release="current">libpcap</Dependency>
<Dependency release="current">libcap</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin/pcap-config</Path>
<Path fileType="header">/usr/include</Path>
<Path fileType="library">/usr/lib/pkgconfig</Path>
<Path fileType="man">/usr/share/man/man3</Path>
</Files>
</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>
<Update release="9">
<Date>2023-04-08</Date>
<Version>1.10.4</Version>
<Date>2023-02-05</Date>
<Version>2.67</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="8">
<Date>2023-01-13</Date>
<Version>1.10.3</Version>
<Date>2022-08-02</Date>
<Version>2.65</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="7">
<Date>2021-07-02</Date>
<Version>1.10.1</Version>
<Comment>Version bump.</Comment>
<Date>2021-06-16</Date>
<Version>2.27</Version>
<Comment>Rebuild</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="6">
<Date>2020-02-01</Date>
<Version>1.9.1</Version>
<Comment>Version bump.</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>
<Date>2020-12-09</Date>
<Version>2.27</Version>
<Comment>Rebuild</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</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">
<Date>2017-05-15</Date>
<Version>1.8.1</Version>
<Comment>Release Bump</Comment>
<Name>Kamil Atlı</Name>
<Email>suvari@pisilinux.org</Email>
<Date>2018-07-15</Date>
<Version>2.25</Version>
<Comment>Rebuild</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="3">
<Date>2016-06-09</Date>
<Version>1.8.1</Version>
<Comment>Version Bump</Comment>
<Name>Kamil Atlı</Name>
<Email>suvari@pisilinux.org</Email>
<Date>2017-09-20</Date>
<Version>2.25</Version>
<Comment>Rebuild.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="2">
<Date>2016-06-09</Date>
<Version>1.7.4</Version>
<Date>2016-04-27</Date>
<Version>2.25</Version>
<Comment>Release Bump</Comment>
<Name>Pisi Linux Community</Name>
<Name>PisiLinux Community</Name>
<Email>admin@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2016-03-25</Date>
<Version>1.7.4</Version>
<Date>2016-03-02</Date>
<Version>2.25</Version>
<Comment>First release</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>