public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH 3/3] libslirp: Add the slirp library as this is required for the net user backend in qemu
Date: Thu, 28 Sep 2023 12:37:01 +0200	[thread overview]
Message-ID: <20230928103702.2652442-3-adolf.belka@ipfire.org> (raw)
In-Reply-To: <20230928103702.2652442-1-adolf.belka@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 5729 bytes --]

- Looking through some of the changelog and some mail list communications it looks like
   qemu decided they did noty want to maintain their own bundled version of libslirp when
   the majority of OS's had their own version now in place. Ubuntu 18.04 did not have
   libslirp but qemu stopped supporting that version from qemu-7.1
- So it looks like all OS's have a standard libslirp available now and qemu have taken
   the decision to no longer have their own version but to use the system version. That
   was always possible to do if use of the system version was explicitly defined but
   the default was to use the bundled version.
- No evidence that libslirp is deprecated.
- The last version of libslirp was released a year ago but it looks like every month or
   so there are a couple of commits merged. The last was a month ago.

Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 config/rootfiles/packages/libslirp |  7 +++
 lfs/libslirp                       | 92 ++++++++++++++++++++++++++++++
 make.sh                            |  1 +
 3 files changed, 100 insertions(+)
 create mode 100644 config/rootfiles/packages/libslirp
 create mode 100644 lfs/libslirp

diff --git a/config/rootfiles/packages/libslirp b/config/rootfiles/packages/libslirp
new file mode 100644
index 000000000..b50dad1ef
--- /dev/null
+++ b/config/rootfiles/packages/libslirp
@@ -0,0 +1,7 @@
+#usr/include/slirp
+#usr/include/slirp/libslirp-version.h
+#usr/include/slirp/libslirp.h
+#usr/lib/libslirp.so
+usr/lib/libslirp.so.0
+usr/lib/libslirp.so.0.4.0
+#usr/lib/pkgconfig/slirp.pc
diff --git a/lfs/libslirp b/lfs/libslirp
new file mode 100644
index 000000000..cdbb7981f
--- /dev/null
+++ b/lfs/libslirp
@@ -0,0 +1,92 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007-2023  IPFire Team  <info(a)ipfire.org>                     #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+SUMMARY    = A general purpose TCP-IP emulator used by virtual machine hypervisors to provide virtual networking services.
+
+
+VER        = 4.7.0
+
+THISAPP    = libslirp-$(VER)
+DL_FILE    = $(THISAPP).tar.xz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = libslirp
+PAK_VER    = 1
+
+DEPS       =
+
+SERVICES   =
+
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_BLAKE2 = ccea2413c1dc6148e80851496955d5a991f37e359dc30946fd901627ce5d100b4ea065189b87dd79f574f15cac0e7468063d347efac9251f7180d3d291b1b2e5
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+b2 : $(subst %,%_BLAKE2,$(objects))
+
+dist:
+	@$(PAK)
+
+###############################################################################
+# Downloading, checking, b2sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
+
+$(subst %,%_BLAKE2,$(objects)) :
+	@$(B2SUM)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+	@$(PREBUILD)
+	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+	cd $(DIR_APP) && meson		--prefix=/usr \
+					builddir/
+	cd $(DIR_APP) && ninja -C builddir/ $(MAKETUNING)
+	cd $(DIR_APP) && ninja -C builddir/ install
+
+	@rm -rf $(DIR_APP)
+	@$(POSTBUILD)
diff --git a/make.sh b/make.sh
index acb692140..7cab222af 100755
--- a/make.sh
+++ b/make.sh
@@ -1494,6 +1494,7 @@ buildipfire() {
   lfsmake2 sdl2
   lfsmake2 libusbredir
   lfsmake2 libseccomp
+  lfsmake2 libslirp
   lfsmake2 qemu
   lfsmake2 netsnmpd
   lfsmake2 nagios_nrpe
-- 
2.42.0


      parent reply	other threads:[~2023-09-28 10:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-28 10:36 [PATCH 1/3] qemu: Update to version 8.1.1 and add libslirp for net user backend Adolf Belka
2023-09-28 10:37 ` [PATCH 2/3] qemu-ga: Update to version 8.1.1 Adolf Belka
2023-09-28 10:37 ` Adolf Belka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230928103702.2652442-3-adolf.belka@ipfire.org \
    --to=adolf.belka@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox